Loading common/view/view.cpp +9 −9 Original line number Diff line number Diff line Loading @@ -94,13 +94,16 @@ void VIEW::Add( VIEW_ITEM* aItem ) aItem->ViewGetLayers( layers, layers_count ); aItem->saveLayers( layers, layers_count ); for( int i = 0; i < layers_count; i++ ) for( int i = 0; i < layers_count; ++i ) { VIEW_LAYER& l = m_layers[layers[i]]; l.items->Insert( aItem ); MarkTargetDirty( l.target ); } if( aItem->viewRequiredUpdate() != VIEW_ITEM::NONE ) MarkForUpdate( aItem ); if( m_dynamic ) aItem->viewAssign( this ); } Loading @@ -122,8 +125,12 @@ void VIEW::Remove( VIEW_ITEM* aItem ) // Clear the GAL cache int prevGroup = aItem->getGroup( layers[i] ); if( prevGroup >= 0 ) { m_gal->DeleteGroup( prevGroup ); aItem->setGroup( layers[i], -1 ); } } } Loading @@ -134,14 +141,10 @@ void VIEW::SetRequired( int aLayerId, int aRequiredId, bool aRequired ) wxASSERT( (unsigned) aRequiredId < m_layers.size() ); if( aRequired ) { m_layers[aLayerId].requiredLayers.insert( aRequiredId ); } else { m_layers[aLayerId].requiredLayers.erase( aRequired ); } } // stupid C++... python lamda would do this in one line Loading Loading @@ -781,11 +784,8 @@ struct VIEW::clearLayerCache } bool operator()( VIEW_ITEM* aItem ) { if( aItem->storesGroups() ) { aItem->deleteGroups(); } return true; } Loading pcbnew/pcb_painter.cpp +1 −5 Original line number Diff line number Diff line Loading @@ -275,10 +275,6 @@ void PCB_PAINTER::draw( const TRACK* aTrack, int aLayer ) if( length < 10 * width ) return; NETINFO_ITEM* net = ( (BOARD*) aTrack->GetParent() )->FindNet( netNumber ); if( !net ) return; const wxString& netName = aTrack->GetShortNetname(); VECTOR2D textPosition = start + line / 2.0; // center of the track double textOrientation = -atan( line.y / line.x ); Loading Loading
common/view/view.cpp +9 −9 Original line number Diff line number Diff line Loading @@ -94,13 +94,16 @@ void VIEW::Add( VIEW_ITEM* aItem ) aItem->ViewGetLayers( layers, layers_count ); aItem->saveLayers( layers, layers_count ); for( int i = 0; i < layers_count; i++ ) for( int i = 0; i < layers_count; ++i ) { VIEW_LAYER& l = m_layers[layers[i]]; l.items->Insert( aItem ); MarkTargetDirty( l.target ); } if( aItem->viewRequiredUpdate() != VIEW_ITEM::NONE ) MarkForUpdate( aItem ); if( m_dynamic ) aItem->viewAssign( this ); } Loading @@ -122,8 +125,12 @@ void VIEW::Remove( VIEW_ITEM* aItem ) // Clear the GAL cache int prevGroup = aItem->getGroup( layers[i] ); if( prevGroup >= 0 ) { m_gal->DeleteGroup( prevGroup ); aItem->setGroup( layers[i], -1 ); } } } Loading @@ -134,14 +141,10 @@ void VIEW::SetRequired( int aLayerId, int aRequiredId, bool aRequired ) wxASSERT( (unsigned) aRequiredId < m_layers.size() ); if( aRequired ) { m_layers[aLayerId].requiredLayers.insert( aRequiredId ); } else { m_layers[aLayerId].requiredLayers.erase( aRequired ); } } // stupid C++... python lamda would do this in one line Loading Loading @@ -781,11 +784,8 @@ struct VIEW::clearLayerCache } bool operator()( VIEW_ITEM* aItem ) { if( aItem->storesGroups() ) { aItem->deleteGroups(); } return true; } Loading
pcbnew/pcb_painter.cpp +1 −5 Original line number Diff line number Diff line Loading @@ -275,10 +275,6 @@ void PCB_PAINTER::draw( const TRACK* aTrack, int aLayer ) if( length < 10 * width ) return; NETINFO_ITEM* net = ( (BOARD*) aTrack->GetParent() )->FindNet( netNumber ); if( !net ) return; const wxString& netName = aTrack->GetShortNetname(); VECTOR2D textPosition = start + line / 2.0; // center of the track double textOrientation = -atan( line.y / line.x ); Loading