Loading eeschema/class_drawsheet.cpp +8 −1 Original line number Original line Diff line number Diff line Loading @@ -239,9 +239,11 @@ void SCH_SHEET::Place( WinEDA_SchematicFrame* frame, wxDC* DC ) * @param aFrame = the schematic frame * @param aFrame = the schematic frame */ */ void SCH_SHEET::CleanupSheet( WinEDA_SchematicFrame* aFrame, void SCH_SHEET::CleanupSheet( WinEDA_SchematicFrame* aFrame, bool aRedraw ) bool aRedraw, bool aSaveForUndoRedo) { { SCH_SHEET_PIN* Pinsheet, * NextPinsheet; SCH_SHEET_PIN* Pinsheet, * NextPinsheet; bool isSaved = false; if( !IsOK( aFrame, _( "Ok to cleanup this sheet" ) ) ) if( !IsOK( aFrame, _( "Ok to cleanup this sheet" ) ) ) return; return; Loading @@ -268,6 +270,11 @@ void SCH_SHEET::CleanupSheet( WinEDA_SchematicFrame* aFrame, NextPinsheet = Pinsheet->Next(); NextPinsheet = Pinsheet->Next(); if( HLabel == NULL ) // Hlabel not found: delete pinsheet if( HLabel == NULL ) // Hlabel not found: delete pinsheet { { if( aSaveForUndoRedo && !isSaved ) { isSaved = true; aFrame->SaveCopyInUndoList( this, UR_CHANGED); } aFrame->OnModify( ); aFrame->OnModify( ); aFrame->DeleteSheetLabel( false, Pinsheet ); aFrame->DeleteSheetLabel( false, Pinsheet ); } } Loading eeschema/class_drawsheet.h +4 −2 Original line number Original line Diff line number Diff line Loading @@ -178,10 +178,12 @@ public: /** Function CleanupSheet /** Function CleanupSheet * Delete pinsheets which are not corresponding to a hierarchical label * Delete pinsheets which are not corresponding to a hierarchical label * @param aRedraw = true to redraw Sheet * @param aFrame = the schematic frame * @param aFrame = the schematic frame * @param aRedraw = true to redraw Sheet * @param aSaveForUndoRedo = true to put this sheet in UndoRedo list, * if it is modified. */ */ void CleanupSheet( WinEDA_SchematicFrame* frame, bool aRedraw ); void CleanupSheet( WinEDA_SchematicFrame* frame, bool aRedraw, bool aSaveForUndoRedo ); /** Function GetPenSize /** Function GetPenSize * @return the size of the "pen" that be used to draw or plot this item * @return the size of the "pen" that be used to draw or plot this item Loading eeschema/schedit.cpp +1 −1 Original line number Original line Diff line number Diff line Loading @@ -383,7 +383,7 @@ void WinEDA_SchematicFrame::Process_Special_Functions( wxCommandEvent& event ) case ID_POPUP_SCH_CLEANUP_SHEET: case ID_POPUP_SCH_CLEANUP_SHEET: if ( screen->GetCurItem() if ( screen->GetCurItem() && screen->GetCurItem()->Type() == DRAW_SHEET_STRUCT_TYPE ) && screen->GetCurItem()->Type() == DRAW_SHEET_STRUCT_TYPE ) ( (SCH_SHEET*) screen->GetCurItem() )->CleanupSheet( this, true ); ( (SCH_SHEET*) screen->GetCurItem() )->CleanupSheet( this, true, true ); break; break; case ID_POPUP_SCH_EDIT_PINSHEET: case ID_POPUP_SCH_EDIT_PINSHEET: Loading pcbnew/moduleframe.cpp +6 −3 Original line number Original line Diff line number Diff line Loading @@ -288,7 +288,6 @@ void WinEDA_ModuleEditFrame::SetToolbars() m_HToolBar->EnableTool( ID_MODEDIT_SAVE_LIBMODULE, active && islib ); m_HToolBar->EnableTool( ID_MODEDIT_SAVE_LIBMODULE, active && islib ); MODULE* module_in_edit = GetBoard()->m_Modules; MODULE* module_in_edit = GetBoard()->m_Modules; if( module_in_edit && module_in_edit->m_Link ) // this is not a new module if( module_in_edit && module_in_edit->m_Link ) // this is not a new module // ... { { BOARD* mainpcb = frame->GetBoard(); BOARD* mainpcb = frame->GetBoard(); MODULE* source_module = mainpcb->m_Modules; MODULE* source_module = mainpcb->m_Modules; Loading Loading @@ -334,7 +333,7 @@ void WinEDA_ModuleEditFrame::SetToolbars() { { m_HToolBar->EnableTool( ID_MODEDIT_LOAD_MODULE_FROM_BOARD, false ); m_HToolBar->EnableTool( ID_MODEDIT_LOAD_MODULE_FROM_BOARD, false ); } } m_HToolBar->Refresh(); if( m_VToolBar ) if( m_VToolBar ) { { Loading @@ -345,6 +344,7 @@ void WinEDA_ModuleEditFrame::SetToolbars() m_VToolBar->EnableTool( ID_PCB_ADD_TEXT_BUTT, active ); m_VToolBar->EnableTool( ID_PCB_ADD_TEXT_BUTT, active ); m_VToolBar->EnableTool( ID_MODEDIT_PLACE_ANCHOR, active ); m_VToolBar->EnableTool( ID_MODEDIT_PLACE_ANCHOR, active ); m_VToolBar->EnableTool( ID_PCB_DELETE_ITEM_BUTT, active ); m_VToolBar->EnableTool( ID_PCB_DELETE_ITEM_BUTT, active ); m_VToolBar->Refresh(); } } if( m_OptionsToolBar ) if( m_OptionsToolBar ) Loading Loading @@ -382,6 +382,7 @@ void WinEDA_ModuleEditFrame::SetToolbars() m_DisplayPadFill ? m_DisplayPadFill ? _( "Show pads in sketch mode" ) : _( "Show pads in sketch mode" ) : _( "Show pads in filled mode" ) ); _( "Show pads in filled mode" ) ); m_OptionsToolBar->Refresh(); } } if( m_AuxiliaryToolBar ) if( m_AuxiliaryToolBar ) Loading @@ -406,6 +407,8 @@ void WinEDA_ModuleEditFrame::SetToolbars() if( m_SelGridBox ) if( m_SelGridBox ) m_SelGridBox->SetSelection( m_LastGridSizeId ); m_SelGridBox->SetSelection( m_LastGridSizeId ); m_AuxiliaryToolBar->Refresh(); } } DisplayUnitsMsg(); DisplayUnitsMsg(); Loading pcbnew/toolbars_update_user_interface.cpp +5 −0 Original line number Original line Diff line number Diff line Loading @@ -141,6 +141,9 @@ void WinEDA_PcbFrame::AuxiliaryToolBar_Update_UI() m_SelGridBox->SetSelection( m_LastGridSizeId ); m_SelGridBox->SetSelection( m_LastGridSizeId ); m_TrackAndViasSizesList_Changed = false; m_TrackAndViasSizesList_Changed = false; m_AuxiliaryToolBar->Refresh(); } } Loading Loading @@ -181,6 +184,7 @@ void WinEDA_PcbFrame::SetToolbars() state = GetScreen()->GetRedoCommandCount() > 0; state = GetScreen()->GetRedoCommandCount() > 0; m_HToolBar->EnableTool( wxID_REDO, state ); m_HToolBar->EnableTool( wxID_REDO, state ); m_HToolBar->Refresh(); if( m_OptionsToolBar ) if( m_OptionsToolBar ) { { Loading Loading @@ -267,6 +271,7 @@ void WinEDA_PcbFrame::SetToolbars() m_OptionsToolBar->ToggleTool( ID_TB_OPTIONS_SHOW_EXTRA_VERTICAL_TOOLBAR1, m_OptionsToolBar->ToggleTool( ID_TB_OPTIONS_SHOW_EXTRA_VERTICAL_TOOLBAR1, m_auimgr.GetPane(wxT("m_AuxVToolBar")).IsShown() ); m_auimgr.GetPane(wxT("m_AuxVToolBar")).IsShown() ); m_OptionsToolBar->Refresh(); } } if( m_AuxiliaryToolBar ) if( m_AuxiliaryToolBar ) Loading Loading
eeschema/class_drawsheet.cpp +8 −1 Original line number Original line Diff line number Diff line Loading @@ -239,9 +239,11 @@ void SCH_SHEET::Place( WinEDA_SchematicFrame* frame, wxDC* DC ) * @param aFrame = the schematic frame * @param aFrame = the schematic frame */ */ void SCH_SHEET::CleanupSheet( WinEDA_SchematicFrame* aFrame, void SCH_SHEET::CleanupSheet( WinEDA_SchematicFrame* aFrame, bool aRedraw ) bool aRedraw, bool aSaveForUndoRedo) { { SCH_SHEET_PIN* Pinsheet, * NextPinsheet; SCH_SHEET_PIN* Pinsheet, * NextPinsheet; bool isSaved = false; if( !IsOK( aFrame, _( "Ok to cleanup this sheet" ) ) ) if( !IsOK( aFrame, _( "Ok to cleanup this sheet" ) ) ) return; return; Loading @@ -268,6 +270,11 @@ void SCH_SHEET::CleanupSheet( WinEDA_SchematicFrame* aFrame, NextPinsheet = Pinsheet->Next(); NextPinsheet = Pinsheet->Next(); if( HLabel == NULL ) // Hlabel not found: delete pinsheet if( HLabel == NULL ) // Hlabel not found: delete pinsheet { { if( aSaveForUndoRedo && !isSaved ) { isSaved = true; aFrame->SaveCopyInUndoList( this, UR_CHANGED); } aFrame->OnModify( ); aFrame->OnModify( ); aFrame->DeleteSheetLabel( false, Pinsheet ); aFrame->DeleteSheetLabel( false, Pinsheet ); } } Loading
eeschema/class_drawsheet.h +4 −2 Original line number Original line Diff line number Diff line Loading @@ -178,10 +178,12 @@ public: /** Function CleanupSheet /** Function CleanupSheet * Delete pinsheets which are not corresponding to a hierarchical label * Delete pinsheets which are not corresponding to a hierarchical label * @param aRedraw = true to redraw Sheet * @param aFrame = the schematic frame * @param aFrame = the schematic frame * @param aRedraw = true to redraw Sheet * @param aSaveForUndoRedo = true to put this sheet in UndoRedo list, * if it is modified. */ */ void CleanupSheet( WinEDA_SchematicFrame* frame, bool aRedraw ); void CleanupSheet( WinEDA_SchematicFrame* frame, bool aRedraw, bool aSaveForUndoRedo ); /** Function GetPenSize /** Function GetPenSize * @return the size of the "pen" that be used to draw or plot this item * @return the size of the "pen" that be used to draw or plot this item Loading
eeschema/schedit.cpp +1 −1 Original line number Original line Diff line number Diff line Loading @@ -383,7 +383,7 @@ void WinEDA_SchematicFrame::Process_Special_Functions( wxCommandEvent& event ) case ID_POPUP_SCH_CLEANUP_SHEET: case ID_POPUP_SCH_CLEANUP_SHEET: if ( screen->GetCurItem() if ( screen->GetCurItem() && screen->GetCurItem()->Type() == DRAW_SHEET_STRUCT_TYPE ) && screen->GetCurItem()->Type() == DRAW_SHEET_STRUCT_TYPE ) ( (SCH_SHEET*) screen->GetCurItem() )->CleanupSheet( this, true ); ( (SCH_SHEET*) screen->GetCurItem() )->CleanupSheet( this, true, true ); break; break; case ID_POPUP_SCH_EDIT_PINSHEET: case ID_POPUP_SCH_EDIT_PINSHEET: Loading
pcbnew/moduleframe.cpp +6 −3 Original line number Original line Diff line number Diff line Loading @@ -288,7 +288,6 @@ void WinEDA_ModuleEditFrame::SetToolbars() m_HToolBar->EnableTool( ID_MODEDIT_SAVE_LIBMODULE, active && islib ); m_HToolBar->EnableTool( ID_MODEDIT_SAVE_LIBMODULE, active && islib ); MODULE* module_in_edit = GetBoard()->m_Modules; MODULE* module_in_edit = GetBoard()->m_Modules; if( module_in_edit && module_in_edit->m_Link ) // this is not a new module if( module_in_edit && module_in_edit->m_Link ) // this is not a new module // ... { { BOARD* mainpcb = frame->GetBoard(); BOARD* mainpcb = frame->GetBoard(); MODULE* source_module = mainpcb->m_Modules; MODULE* source_module = mainpcb->m_Modules; Loading Loading @@ -334,7 +333,7 @@ void WinEDA_ModuleEditFrame::SetToolbars() { { m_HToolBar->EnableTool( ID_MODEDIT_LOAD_MODULE_FROM_BOARD, false ); m_HToolBar->EnableTool( ID_MODEDIT_LOAD_MODULE_FROM_BOARD, false ); } } m_HToolBar->Refresh(); if( m_VToolBar ) if( m_VToolBar ) { { Loading @@ -345,6 +344,7 @@ void WinEDA_ModuleEditFrame::SetToolbars() m_VToolBar->EnableTool( ID_PCB_ADD_TEXT_BUTT, active ); m_VToolBar->EnableTool( ID_PCB_ADD_TEXT_BUTT, active ); m_VToolBar->EnableTool( ID_MODEDIT_PLACE_ANCHOR, active ); m_VToolBar->EnableTool( ID_MODEDIT_PLACE_ANCHOR, active ); m_VToolBar->EnableTool( ID_PCB_DELETE_ITEM_BUTT, active ); m_VToolBar->EnableTool( ID_PCB_DELETE_ITEM_BUTT, active ); m_VToolBar->Refresh(); } } if( m_OptionsToolBar ) if( m_OptionsToolBar ) Loading Loading @@ -382,6 +382,7 @@ void WinEDA_ModuleEditFrame::SetToolbars() m_DisplayPadFill ? m_DisplayPadFill ? _( "Show pads in sketch mode" ) : _( "Show pads in sketch mode" ) : _( "Show pads in filled mode" ) ); _( "Show pads in filled mode" ) ); m_OptionsToolBar->Refresh(); } } if( m_AuxiliaryToolBar ) if( m_AuxiliaryToolBar ) Loading @@ -406,6 +407,8 @@ void WinEDA_ModuleEditFrame::SetToolbars() if( m_SelGridBox ) if( m_SelGridBox ) m_SelGridBox->SetSelection( m_LastGridSizeId ); m_SelGridBox->SetSelection( m_LastGridSizeId ); m_AuxiliaryToolBar->Refresh(); } } DisplayUnitsMsg(); DisplayUnitsMsg(); Loading
pcbnew/toolbars_update_user_interface.cpp +5 −0 Original line number Original line Diff line number Diff line Loading @@ -141,6 +141,9 @@ void WinEDA_PcbFrame::AuxiliaryToolBar_Update_UI() m_SelGridBox->SetSelection( m_LastGridSizeId ); m_SelGridBox->SetSelection( m_LastGridSizeId ); m_TrackAndViasSizesList_Changed = false; m_TrackAndViasSizesList_Changed = false; m_AuxiliaryToolBar->Refresh(); } } Loading Loading @@ -181,6 +184,7 @@ void WinEDA_PcbFrame::SetToolbars() state = GetScreen()->GetRedoCommandCount() > 0; state = GetScreen()->GetRedoCommandCount() > 0; m_HToolBar->EnableTool( wxID_REDO, state ); m_HToolBar->EnableTool( wxID_REDO, state ); m_HToolBar->Refresh(); if( m_OptionsToolBar ) if( m_OptionsToolBar ) { { Loading Loading @@ -267,6 +271,7 @@ void WinEDA_PcbFrame::SetToolbars() m_OptionsToolBar->ToggleTool( ID_TB_OPTIONS_SHOW_EXTRA_VERTICAL_TOOLBAR1, m_OptionsToolBar->ToggleTool( ID_TB_OPTIONS_SHOW_EXTRA_VERTICAL_TOOLBAR1, m_auimgr.GetPane(wxT("m_AuxVToolBar")).IsShown() ); m_auimgr.GetPane(wxT("m_AuxVToolBar")).IsShown() ); m_OptionsToolBar->Refresh(); } } if( m_AuxiliaryToolBar ) if( m_AuxiliaryToolBar ) Loading