Loading common/tool/tool_dispatcher.cpp +0 −2 Original line number Original line Diff line number Diff line Loading @@ -217,8 +217,6 @@ void TOOL_DISPATCHER::DispatchWxEvent( wxEvent& aEvent ) type == wxEVT_MIDDLE_DOWN || type == wxEVT_MIDDLE_UP || type == wxEVT_MIDDLE_DOWN || type == wxEVT_MIDDLE_UP || type == wxEVT_RIGHT_DOWN || type == wxEVT_RIGHT_UP ) type == wxEVT_RIGHT_DOWN || type == wxEVT_RIGHT_UP ) { { wxMouseEvent* me = static_cast<wxMouseEvent*>( &aEvent ); pos = getView()->ToWorld ( getCurrentMousePos() ); pos = getView()->ToWorld ( getCurrentMousePos() ); if( pos != m_lastMousePos ) if( pos != m_lastMousePos ) { { Loading common/view/view.cpp +5 −1 Original line number Original line Diff line number Diff line Loading @@ -41,7 +41,7 @@ using namespace KiGfx; using namespace KiGfx; VIEW::VIEW( bool aIsDynamic ) : VIEW::VIEW( bool aIsDynamic ) : m_enableOrderModifier( false ), m_enableOrderModifier( true ), m_scale( 1.0 ), m_scale( 1.0 ), m_painter( NULL ), m_painter( NULL ), m_gal( NULL ), m_gal( NULL ), Loading Loading @@ -415,6 +415,8 @@ void VIEW::UpdateAllLayersColor() updateItemsColor visitor( l->id, m_painter, m_gal ); updateItemsColor visitor( l->id, m_painter, m_gal ); l->items->Query( r, visitor ); l->items->Query( r, visitor ); } } MarkDirty(); } } Loading Loading @@ -525,6 +527,8 @@ void VIEW::UpdateAllLayersOrder() { { ChangeLayerDepth( l.first, l.second.renderingOrder ); ChangeLayerDepth( l.first, l.second.renderingOrder ); } } MarkDirty(); } } Loading include/wxPcbStruct.h +8 −10 Original line number Original line Diff line number Diff line Loading @@ -136,21 +136,13 @@ protected: * will change the currently active layer to \a aLayer and also * will change the currently active layer to \a aLayer and also * update the PCB_LAYER_WIDGET. * update the PCB_LAYER_WIDGET. */ */ void setActiveLayer( LAYER_NUM aLayer, bool doLayerWidgetUpdate = true ) void setCurrentLayer( LAYER_NUM aLayer, bool doLayerWidgetUpdate = true ); { ( (PCB_SCREEN*) GetScreen() )->m_Active_Layer = aLayer; setHighContrastLayer( aLayer ); if( doLayerWidgetUpdate ) syncLayerWidgetLayer(); } /** /** * Function getActiveLayer * Function getActiveLayer * returns the active layer * returns the active layer */ */ LAYER_NUM getActiveLayer() LAYER_NUM getCurrentLayer() { { return ( (PCB_SCREEN*) GetScreen() )->m_Active_Layer; return ( (PCB_SCREEN*) GetScreen() )->m_Active_Layer; } } Loading @@ -161,6 +153,12 @@ protected: */ */ void setHighContrastLayer( LAYER_NUM aLayer ); void setHighContrastLayer( LAYER_NUM aLayer ); /** * Function setTopLayer * moves the selected layer to the top, so it is displayed above all others. */ void setTopLayer( LAYER_NUM aLayer ); /** /** * Function syncLayerWidgetLayer * Function syncLayerWidgetLayer * updates the currently layer "selection" within the PCB_LAYER_WIDGET. * updates the currently layer "selection" within the PCB_LAYER_WIDGET. Loading pcbnew/class_pcb_layer_widget.cpp +2 −2 Original line number Original line Diff line number Diff line Loading @@ -183,7 +183,7 @@ void PCB_LAYER_WIDGET::onPopupSelection( wxCommandEvent& event ) if( IsCopperLayer( layer ) ) if( IsCopperLayer( layer ) ) { { bool loc_visible = visible; bool loc_visible = visible; if( force_active_layer_visible && (layer == myframe->getActiveLayer() ) ) if( force_active_layer_visible && (layer == myframe->getCurrentLayer() ) ) loc_visible = true; loc_visible = true; cb->SetValue( loc_visible ); cb->SetValue( loc_visible ); Loading Loading @@ -354,7 +354,7 @@ bool PCB_LAYER_WIDGET::OnLayerSelect( LAYER_NUM aLayer ) { { // the layer change from the PCB_LAYER_WIDGET can be denied by returning // the layer change from the PCB_LAYER_WIDGET can be denied by returning // false from this function. // false from this function. myframe->setActiveLayer( aLayer, false ); myframe->setCurrentLayer( aLayer, false ); if( m_alwaysShowActiveCopperLayer ) if( m_alwaysShowActiveCopperLayer ) OnLayerSelected(); OnLayerSelected(); Loading pcbnew/deltrack.cpp +2 −2 Original line number Original line Diff line number Diff line Loading @@ -53,7 +53,7 @@ TRACK* PCB_EDIT_FRAME::Delete_Segment( wxDC* DC, TRACK* aTrack ) { { if( g_CurrentTrackList.GetCount() > 0 ) if( g_CurrentTrackList.GetCount() > 0 ) { { LAYER_NUM previous_layer = getActiveLayer(); LAYER_NUM previous_layer = getCurrentLayer(); DBG( g_CurrentTrackList.VerifyListIntegrity(); ) DBG( g_CurrentTrackList.VerifyListIntegrity(); ) Loading Loading @@ -86,7 +86,7 @@ TRACK* PCB_EDIT_FRAME::Delete_Segment( wxDC* DC, TRACK* aTrack ) // Correct active layer which could change if a via // Correct active layer which could change if a via // has been erased // has been erased setActiveLayer( previous_layer ); setCurrentLayer( previous_layer ); UpdateStatusBar(); UpdateStatusBar(); Loading Loading
common/tool/tool_dispatcher.cpp +0 −2 Original line number Original line Diff line number Diff line Loading @@ -217,8 +217,6 @@ void TOOL_DISPATCHER::DispatchWxEvent( wxEvent& aEvent ) type == wxEVT_MIDDLE_DOWN || type == wxEVT_MIDDLE_UP || type == wxEVT_MIDDLE_DOWN || type == wxEVT_MIDDLE_UP || type == wxEVT_RIGHT_DOWN || type == wxEVT_RIGHT_UP ) type == wxEVT_RIGHT_DOWN || type == wxEVT_RIGHT_UP ) { { wxMouseEvent* me = static_cast<wxMouseEvent*>( &aEvent ); pos = getView()->ToWorld ( getCurrentMousePos() ); pos = getView()->ToWorld ( getCurrentMousePos() ); if( pos != m_lastMousePos ) if( pos != m_lastMousePos ) { { Loading
common/view/view.cpp +5 −1 Original line number Original line Diff line number Diff line Loading @@ -41,7 +41,7 @@ using namespace KiGfx; using namespace KiGfx; VIEW::VIEW( bool aIsDynamic ) : VIEW::VIEW( bool aIsDynamic ) : m_enableOrderModifier( false ), m_enableOrderModifier( true ), m_scale( 1.0 ), m_scale( 1.0 ), m_painter( NULL ), m_painter( NULL ), m_gal( NULL ), m_gal( NULL ), Loading Loading @@ -415,6 +415,8 @@ void VIEW::UpdateAllLayersColor() updateItemsColor visitor( l->id, m_painter, m_gal ); updateItemsColor visitor( l->id, m_painter, m_gal ); l->items->Query( r, visitor ); l->items->Query( r, visitor ); } } MarkDirty(); } } Loading Loading @@ -525,6 +527,8 @@ void VIEW::UpdateAllLayersOrder() { { ChangeLayerDepth( l.first, l.second.renderingOrder ); ChangeLayerDepth( l.first, l.second.renderingOrder ); } } MarkDirty(); } } Loading
include/wxPcbStruct.h +8 −10 Original line number Original line Diff line number Diff line Loading @@ -136,21 +136,13 @@ protected: * will change the currently active layer to \a aLayer and also * will change the currently active layer to \a aLayer and also * update the PCB_LAYER_WIDGET. * update the PCB_LAYER_WIDGET. */ */ void setActiveLayer( LAYER_NUM aLayer, bool doLayerWidgetUpdate = true ) void setCurrentLayer( LAYER_NUM aLayer, bool doLayerWidgetUpdate = true ); { ( (PCB_SCREEN*) GetScreen() )->m_Active_Layer = aLayer; setHighContrastLayer( aLayer ); if( doLayerWidgetUpdate ) syncLayerWidgetLayer(); } /** /** * Function getActiveLayer * Function getActiveLayer * returns the active layer * returns the active layer */ */ LAYER_NUM getActiveLayer() LAYER_NUM getCurrentLayer() { { return ( (PCB_SCREEN*) GetScreen() )->m_Active_Layer; return ( (PCB_SCREEN*) GetScreen() )->m_Active_Layer; } } Loading @@ -161,6 +153,12 @@ protected: */ */ void setHighContrastLayer( LAYER_NUM aLayer ); void setHighContrastLayer( LAYER_NUM aLayer ); /** * Function setTopLayer * moves the selected layer to the top, so it is displayed above all others. */ void setTopLayer( LAYER_NUM aLayer ); /** /** * Function syncLayerWidgetLayer * Function syncLayerWidgetLayer * updates the currently layer "selection" within the PCB_LAYER_WIDGET. * updates the currently layer "selection" within the PCB_LAYER_WIDGET. Loading
pcbnew/class_pcb_layer_widget.cpp +2 −2 Original line number Original line Diff line number Diff line Loading @@ -183,7 +183,7 @@ void PCB_LAYER_WIDGET::onPopupSelection( wxCommandEvent& event ) if( IsCopperLayer( layer ) ) if( IsCopperLayer( layer ) ) { { bool loc_visible = visible; bool loc_visible = visible; if( force_active_layer_visible && (layer == myframe->getActiveLayer() ) ) if( force_active_layer_visible && (layer == myframe->getCurrentLayer() ) ) loc_visible = true; loc_visible = true; cb->SetValue( loc_visible ); cb->SetValue( loc_visible ); Loading Loading @@ -354,7 +354,7 @@ bool PCB_LAYER_WIDGET::OnLayerSelect( LAYER_NUM aLayer ) { { // the layer change from the PCB_LAYER_WIDGET can be denied by returning // the layer change from the PCB_LAYER_WIDGET can be denied by returning // false from this function. // false from this function. myframe->setActiveLayer( aLayer, false ); myframe->setCurrentLayer( aLayer, false ); if( m_alwaysShowActiveCopperLayer ) if( m_alwaysShowActiveCopperLayer ) OnLayerSelected(); OnLayerSelected(); Loading
pcbnew/deltrack.cpp +2 −2 Original line number Original line Diff line number Diff line Loading @@ -53,7 +53,7 @@ TRACK* PCB_EDIT_FRAME::Delete_Segment( wxDC* DC, TRACK* aTrack ) { { if( g_CurrentTrackList.GetCount() > 0 ) if( g_CurrentTrackList.GetCount() > 0 ) { { LAYER_NUM previous_layer = getActiveLayer(); LAYER_NUM previous_layer = getCurrentLayer(); DBG( g_CurrentTrackList.VerifyListIntegrity(); ) DBG( g_CurrentTrackList.VerifyListIntegrity(); ) Loading Loading @@ -86,7 +86,7 @@ TRACK* PCB_EDIT_FRAME::Delete_Segment( wxDC* DC, TRACK* aTrack ) // Correct active layer which could change if a via // Correct active layer which could change if a via // has been erased // has been erased setActiveLayer( previous_layer ); setCurrentLayer( previous_layer ); UpdateStatusBar(); UpdateStatusBar(); Loading