Loading common/drawpanel.cpp +2 −1 Original line number Diff line number Diff line Loading @@ -79,6 +79,7 @@ WinEDA_DrawPanel::WinEDA_DrawPanel( WinEDA_DrawFrame* parent, int id, m_AbortEnable = m_AbortRequest = false; m_AutoPAN_Enable = TRUE; m_IgnoreMouseEvents = 0; m_DisableEraseBG = false; ManageCurseur = NULL; ForceCloseManageCurseur = NULL; Loading Loading @@ -673,7 +674,7 @@ void WinEDA_DrawPanel::OnPaint( wxPaintEvent& event ) // call ~wxDCClipper() before ~wxPaintDC() { wxDCClipper dcclip( paintDC, PaintClipBox ); ReDraw( &paintDC, true ); ReDraw( &paintDC, m_DisableEraseBG ? false : true ); } m_ClipBox = tmp; Loading common/zoom.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -37,7 +37,7 @@ void WinEDA_DrawFrame::Recadre_Trace( bool ToMouse ) * use Refresh() and update() do not change problems */ INSTALL_DC( dc, DrawPanel ); DrawPanel->ReDraw( &dc ); DrawPanel->ReDraw( &dc, DrawPanel->m_DisableEraseBG ? false : true ); /* Move the mouse cursor to the on grid graphic cursor position */ if( ToMouse == TRUE ) Loading cvpcb/CMakeLists.txt +1 −1 Original line number Diff line number Diff line Loading @@ -36,7 +36,7 @@ set(CVPCB_SRCS listboxes.cpp listlib.cpp loadcmp.cpp menucfg.cpp menubar.cpp readschematicnetlist.cpp savecmp.cpp setvisu.cpp Loading cvpcb/menucfg.cpp→cvpcb/menubar.cpp +18 −7 Original line number Diff line number Diff line /** * @file ./menucfg.cpp * @file menucfg.cpp * (Re)Create the CvPCB main MenuBar */ #include "fctsys.h" Loading @@ -18,10 +18,19 @@ void WinEDA_CvpcbFrame::ReCreateMenuBar() { wxMenuItem* item; wxMenuBar* menuBar; wxMenuBar* menuBar = GetMenuBar(); if( ! menuBar ) menuBar = new wxMenuBar(); // Delete all existing menus so they can be rebuilt. // This allows language changes of the menu text on the fly. menuBar->Freeze(); while( menuBar->GetMenuCount() ) delete menuBar->Remove(0); // Recreate all menus: wxMenu* filesMenu = new wxMenu; item = new wxMenuItem( filesMenu, ID_LOAD_PROJECT, _( "&Open" ), Loading Loading @@ -96,14 +105,16 @@ void WinEDA_CvpcbFrame::ReCreateMenuBar() #endif /* !defined(__WXMAC__) */ /** * Create the menubar and append all submenus */ // Create the menubar and append all submenus menuBar->Append( filesMenu, _( "&File" ) ); menuBar->Append( configmenu, _( "&Preferences" ) ); menuBar->Append( helpMenu, _( "&Help" ) ); /* Calling SetMenuBar() will Destroy the existing menu bar so it can be * rebuilt. This allows language changes of the menu text on the fly. */ menuBar->Thaw(); // Associate the menu bar with the frame, if no previous menubar if( GetMenuBar() == NULL ) SetMenuBar( menuBar ); else menuBar->Refresh(); } eeschema/menubar.cpp +38 −50 Original line number Diff line number Diff line Loading @@ -28,34 +28,34 @@ void SCH_EDIT_FRAME::ReCreateMenuBar() wxMenuItem* item; wxMenuBar* menuBar = GetMenuBar(); /** * Destroy the existing menu bar so it can be rebuilt. This allows * language changes of the menu text on the fly. */ if( menuBar ) SetMenuBar( NULL ); if( ! menuBar ) menuBar = new wxMenuBar(); /** * File menu */ // Delete all existing menus so they can be rebuilt. // This allows language changes of the menu text on the fly. menuBar->Freeze(); while( menuBar->GetMenuCount() ) delete menuBar->Remove(0); // Recreate all menus: // File menu wxMenu* filesMenu = new wxMenu; /* New */ // New item = new wxMenuItem( filesMenu, ID_NEW_PROJECT, _( "&New\tCtrl+N" ), _( "New schematic project" ) ); item->SetBitmap( new_xpm ); filesMenu->Append( item ); /* Open */ // Open item = new wxMenuItem( filesMenu, ID_LOAD_PROJECT, _( "&Open\tCtrl+O" ), _( "Open an existing schematic project" ) ); item->SetBitmap( open_xpm ); filesMenu->Append( item ); /* Open Recent submenu */ // Open Recent submenu wxMenu* openRecentMenu = new wxMenu(); wxGetApp().m_fileHistory.AddFilesToMenu( openRecentMenu ); ADD_MENUITEM_WITH_HELP_AND_SUBMENU( filesMenu, openRecentMenu, Loading @@ -63,11 +63,9 @@ void SCH_EDIT_FRAME::ReCreateMenuBar() _( "Open a recent opened schematic project" ), open_project_xpm ); /* Separator */ filesMenu->AppendSeparator(); /* Save */ /* Save Project */ // Save schematic filesMenu->AppendSeparator(); item = new wxMenuItem( filesMenu, ID_SAVE_PROJECT, _( "&Save Whole Schematic Project\tCtrl+S" ), _( "Save all sheets in the schematic project" ) ); Loading @@ -79,22 +77,21 @@ void SCH_EDIT_FRAME::ReCreateMenuBar() item->SetBitmap( save_xpm ); filesMenu->Append( item ); /* Save as... */ // Save as... item = new wxMenuItem( filesMenu, ID_SAVE_ONE_SHEET_AS, _( "Save Current Sheet &as" ), _( "Save current schematic sheet as..." ) ); item->SetBitmap( save_as_xpm ); filesMenu->Append( item ); /* Separator */ filesMenu->AppendSeparator(); /* Print */ // Print filesMenu->AppendSeparator(); item = new wxMenuItem( filesMenu, wxID_PRINT, _( "P&rint" ), _( "Print schematic" ) ); item->SetBitmap( print_button ); filesMenu->Append( item ); /* Plot submenu */ // Plot submenu wxMenu* choice_plot_fmt = new wxMenu; item = new wxMenuItem( choice_plot_fmt, ID_GEN_PLOT_PS, _( "Plot PostScript" ), Loading @@ -108,19 +105,19 @@ void SCH_EDIT_FRAME::ReCreateMenuBar() item->SetBitmap( plot_HPG_xpm ); choice_plot_fmt->Append( item ); /* Plot SVG */ // Plot SVG item = new wxMenuItem( choice_plot_fmt, ID_GEN_PLOT_SVG, _( "Plot SVG" ), _( "Plot schematic sheet in SVG format" ) ); item->SetBitmap( plot_xpm ); choice_plot_fmt->Append( item ); /* Plot DXF */ // Plot DXF item = new wxMenuItem( choice_plot_fmt, ID_GEN_PLOT_DXF, _( "Plot DXF" ), _( "Plot schematic sheet in DXF format" ) ); item->SetBitmap( plot_xpm ); choice_plot_fmt->Append( item ); /* Under windows, one can draw to the clipboard */ // Under windows, one can draw to the clipboard #ifdef __WINDOWS__ item = new wxMenuItem( choice_plot_fmt, ID_GEN_COPY_SHEET_TO_CLIPBOARD, Loading @@ -128,7 +125,6 @@ void SCH_EDIT_FRAME::ReCreateMenuBar() _( "Export drawings to clipboard" ) ); item->SetBitmap( copy_button ); choice_plot_fmt->Append( item ); #endif ADD_MENUITEM_WITH_HELP_AND_SUBMENU( filesMenu, choice_plot_fmt, Loading @@ -136,7 +132,7 @@ void SCH_EDIT_FRAME::ReCreateMenuBar() _( "Plot schematic sheet in HPGL, PostScript or SVG format" ), plot_xpm ); /* Quit on all platforms except WXMAC */ // Quit on all platforms except WXMAC #if !defined(__WXMAC__) filesMenu->AppendSeparator(); Loading @@ -144,15 +140,12 @@ void SCH_EDIT_FRAME::ReCreateMenuBar() item->SetBitmap( exit_xpm ); filesMenu->Append( item ); #endif /* !defined( __WXMAC__) */ #endif // !defined( __WXMAC__) /** * Edit menu */ // Edit menu wxMenu* editMenu = new wxMenu; /* Undo */ // Undo text = AddHotkeyName( _( "Undo" ), s_Schematic_Hokeys_Descr, HK_UNDO ); item = new wxMenuItem( editMenu, wxID_UNDO, text, HELP_UNDO, wxITEM_NORMAL ); Loading @@ -166,10 +159,8 @@ void SCH_EDIT_FRAME::ReCreateMenuBar() item->SetBitmap( redo_xpm ); editMenu->Append( item ); /* Separator */ editMenu->AppendSeparator(); /* Delete */ editMenu->AppendSeparator(); item = new wxMenuItem( editMenu, ID_SCHEMATIC_DELETE_ITEM_BUTT, _( "Delete" ), HELP_DELETE_ITEMS, wxITEM_NORMAL ); item->SetBitmap( delete_body_xpm ); Loading @@ -195,9 +186,7 @@ void SCH_EDIT_FRAME::ReCreateMenuBar() editMenu->Append( item ); /** * View menu */ // View menu wxMenu* viewMenu = new wxMenu; /* Important Note for ZOOM IN and ZOOM OUT commands from menubar: Loading Loading @@ -378,9 +367,7 @@ void SCH_EDIT_FRAME::ReCreateMenuBar() placeMenu->Append( item ); /** * Preferences Menu */ // Preferences Menu wxMenu* configmenu = new wxMenu; /* Library */ Loading Loading @@ -423,9 +410,7 @@ void SCH_EDIT_FRAME::ReCreateMenuBar() configmenu->Append( item ); /** * Help Menu */ // Help Menu wxMenu* helpMenu = new wxMenu; AddHelpVersionInfoMenuEntry( helpMenu ); Loading @@ -446,9 +431,7 @@ void SCH_EDIT_FRAME::ReCreateMenuBar() #endif /* !defined(__WXMAC__) */ /** * Create the menubar and append all submenus */ // Create the menubar and append all submenus menuBar->Append( filesMenu, _( "&File" ) ); menuBar->Append( editMenu, _( "&Edit" ) ); menuBar->Append( viewMenu, _( "&View" ) ); Loading @@ -456,6 +439,11 @@ void SCH_EDIT_FRAME::ReCreateMenuBar() menuBar->Append( configmenu, _( "&Preferences" ) ); menuBar->Append( helpMenu, _( "&Help" ) ); /* Associate the menu bar with the frame */ menuBar->Thaw(); // Associate the menu bar with the frame, if no previous menubar if( GetMenuBar() == NULL ) SetMenuBar( menuBar ); else menuBar->Refresh(); } Loading
common/drawpanel.cpp +2 −1 Original line number Diff line number Diff line Loading @@ -79,6 +79,7 @@ WinEDA_DrawPanel::WinEDA_DrawPanel( WinEDA_DrawFrame* parent, int id, m_AbortEnable = m_AbortRequest = false; m_AutoPAN_Enable = TRUE; m_IgnoreMouseEvents = 0; m_DisableEraseBG = false; ManageCurseur = NULL; ForceCloseManageCurseur = NULL; Loading Loading @@ -673,7 +674,7 @@ void WinEDA_DrawPanel::OnPaint( wxPaintEvent& event ) // call ~wxDCClipper() before ~wxPaintDC() { wxDCClipper dcclip( paintDC, PaintClipBox ); ReDraw( &paintDC, true ); ReDraw( &paintDC, m_DisableEraseBG ? false : true ); } m_ClipBox = tmp; Loading
common/zoom.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -37,7 +37,7 @@ void WinEDA_DrawFrame::Recadre_Trace( bool ToMouse ) * use Refresh() and update() do not change problems */ INSTALL_DC( dc, DrawPanel ); DrawPanel->ReDraw( &dc ); DrawPanel->ReDraw( &dc, DrawPanel->m_DisableEraseBG ? false : true ); /* Move the mouse cursor to the on grid graphic cursor position */ if( ToMouse == TRUE ) Loading
cvpcb/CMakeLists.txt +1 −1 Original line number Diff line number Diff line Loading @@ -36,7 +36,7 @@ set(CVPCB_SRCS listboxes.cpp listlib.cpp loadcmp.cpp menucfg.cpp menubar.cpp readschematicnetlist.cpp savecmp.cpp setvisu.cpp Loading
cvpcb/menucfg.cpp→cvpcb/menubar.cpp +18 −7 Original line number Diff line number Diff line /** * @file ./menucfg.cpp * @file menucfg.cpp * (Re)Create the CvPCB main MenuBar */ #include "fctsys.h" Loading @@ -18,10 +18,19 @@ void WinEDA_CvpcbFrame::ReCreateMenuBar() { wxMenuItem* item; wxMenuBar* menuBar; wxMenuBar* menuBar = GetMenuBar(); if( ! menuBar ) menuBar = new wxMenuBar(); // Delete all existing menus so they can be rebuilt. // This allows language changes of the menu text on the fly. menuBar->Freeze(); while( menuBar->GetMenuCount() ) delete menuBar->Remove(0); // Recreate all menus: wxMenu* filesMenu = new wxMenu; item = new wxMenuItem( filesMenu, ID_LOAD_PROJECT, _( "&Open" ), Loading Loading @@ -96,14 +105,16 @@ void WinEDA_CvpcbFrame::ReCreateMenuBar() #endif /* !defined(__WXMAC__) */ /** * Create the menubar and append all submenus */ // Create the menubar and append all submenus menuBar->Append( filesMenu, _( "&File" ) ); menuBar->Append( configmenu, _( "&Preferences" ) ); menuBar->Append( helpMenu, _( "&Help" ) ); /* Calling SetMenuBar() will Destroy the existing menu bar so it can be * rebuilt. This allows language changes of the menu text on the fly. */ menuBar->Thaw(); // Associate the menu bar with the frame, if no previous menubar if( GetMenuBar() == NULL ) SetMenuBar( menuBar ); else menuBar->Refresh(); }
eeschema/menubar.cpp +38 −50 Original line number Diff line number Diff line Loading @@ -28,34 +28,34 @@ void SCH_EDIT_FRAME::ReCreateMenuBar() wxMenuItem* item; wxMenuBar* menuBar = GetMenuBar(); /** * Destroy the existing menu bar so it can be rebuilt. This allows * language changes of the menu text on the fly. */ if( menuBar ) SetMenuBar( NULL ); if( ! menuBar ) menuBar = new wxMenuBar(); /** * File menu */ // Delete all existing menus so they can be rebuilt. // This allows language changes of the menu text on the fly. menuBar->Freeze(); while( menuBar->GetMenuCount() ) delete menuBar->Remove(0); // Recreate all menus: // File menu wxMenu* filesMenu = new wxMenu; /* New */ // New item = new wxMenuItem( filesMenu, ID_NEW_PROJECT, _( "&New\tCtrl+N" ), _( "New schematic project" ) ); item->SetBitmap( new_xpm ); filesMenu->Append( item ); /* Open */ // Open item = new wxMenuItem( filesMenu, ID_LOAD_PROJECT, _( "&Open\tCtrl+O" ), _( "Open an existing schematic project" ) ); item->SetBitmap( open_xpm ); filesMenu->Append( item ); /* Open Recent submenu */ // Open Recent submenu wxMenu* openRecentMenu = new wxMenu(); wxGetApp().m_fileHistory.AddFilesToMenu( openRecentMenu ); ADD_MENUITEM_WITH_HELP_AND_SUBMENU( filesMenu, openRecentMenu, Loading @@ -63,11 +63,9 @@ void SCH_EDIT_FRAME::ReCreateMenuBar() _( "Open a recent opened schematic project" ), open_project_xpm ); /* Separator */ filesMenu->AppendSeparator(); /* Save */ /* Save Project */ // Save schematic filesMenu->AppendSeparator(); item = new wxMenuItem( filesMenu, ID_SAVE_PROJECT, _( "&Save Whole Schematic Project\tCtrl+S" ), _( "Save all sheets in the schematic project" ) ); Loading @@ -79,22 +77,21 @@ void SCH_EDIT_FRAME::ReCreateMenuBar() item->SetBitmap( save_xpm ); filesMenu->Append( item ); /* Save as... */ // Save as... item = new wxMenuItem( filesMenu, ID_SAVE_ONE_SHEET_AS, _( "Save Current Sheet &as" ), _( "Save current schematic sheet as..." ) ); item->SetBitmap( save_as_xpm ); filesMenu->Append( item ); /* Separator */ filesMenu->AppendSeparator(); /* Print */ // Print filesMenu->AppendSeparator(); item = new wxMenuItem( filesMenu, wxID_PRINT, _( "P&rint" ), _( "Print schematic" ) ); item->SetBitmap( print_button ); filesMenu->Append( item ); /* Plot submenu */ // Plot submenu wxMenu* choice_plot_fmt = new wxMenu; item = new wxMenuItem( choice_plot_fmt, ID_GEN_PLOT_PS, _( "Plot PostScript" ), Loading @@ -108,19 +105,19 @@ void SCH_EDIT_FRAME::ReCreateMenuBar() item->SetBitmap( plot_HPG_xpm ); choice_plot_fmt->Append( item ); /* Plot SVG */ // Plot SVG item = new wxMenuItem( choice_plot_fmt, ID_GEN_PLOT_SVG, _( "Plot SVG" ), _( "Plot schematic sheet in SVG format" ) ); item->SetBitmap( plot_xpm ); choice_plot_fmt->Append( item ); /* Plot DXF */ // Plot DXF item = new wxMenuItem( choice_plot_fmt, ID_GEN_PLOT_DXF, _( "Plot DXF" ), _( "Plot schematic sheet in DXF format" ) ); item->SetBitmap( plot_xpm ); choice_plot_fmt->Append( item ); /* Under windows, one can draw to the clipboard */ // Under windows, one can draw to the clipboard #ifdef __WINDOWS__ item = new wxMenuItem( choice_plot_fmt, ID_GEN_COPY_SHEET_TO_CLIPBOARD, Loading @@ -128,7 +125,6 @@ void SCH_EDIT_FRAME::ReCreateMenuBar() _( "Export drawings to clipboard" ) ); item->SetBitmap( copy_button ); choice_plot_fmt->Append( item ); #endif ADD_MENUITEM_WITH_HELP_AND_SUBMENU( filesMenu, choice_plot_fmt, Loading @@ -136,7 +132,7 @@ void SCH_EDIT_FRAME::ReCreateMenuBar() _( "Plot schematic sheet in HPGL, PostScript or SVG format" ), plot_xpm ); /* Quit on all platforms except WXMAC */ // Quit on all platforms except WXMAC #if !defined(__WXMAC__) filesMenu->AppendSeparator(); Loading @@ -144,15 +140,12 @@ void SCH_EDIT_FRAME::ReCreateMenuBar() item->SetBitmap( exit_xpm ); filesMenu->Append( item ); #endif /* !defined( __WXMAC__) */ #endif // !defined( __WXMAC__) /** * Edit menu */ // Edit menu wxMenu* editMenu = new wxMenu; /* Undo */ // Undo text = AddHotkeyName( _( "Undo" ), s_Schematic_Hokeys_Descr, HK_UNDO ); item = new wxMenuItem( editMenu, wxID_UNDO, text, HELP_UNDO, wxITEM_NORMAL ); Loading @@ -166,10 +159,8 @@ void SCH_EDIT_FRAME::ReCreateMenuBar() item->SetBitmap( redo_xpm ); editMenu->Append( item ); /* Separator */ editMenu->AppendSeparator(); /* Delete */ editMenu->AppendSeparator(); item = new wxMenuItem( editMenu, ID_SCHEMATIC_DELETE_ITEM_BUTT, _( "Delete" ), HELP_DELETE_ITEMS, wxITEM_NORMAL ); item->SetBitmap( delete_body_xpm ); Loading @@ -195,9 +186,7 @@ void SCH_EDIT_FRAME::ReCreateMenuBar() editMenu->Append( item ); /** * View menu */ // View menu wxMenu* viewMenu = new wxMenu; /* Important Note for ZOOM IN and ZOOM OUT commands from menubar: Loading Loading @@ -378,9 +367,7 @@ void SCH_EDIT_FRAME::ReCreateMenuBar() placeMenu->Append( item ); /** * Preferences Menu */ // Preferences Menu wxMenu* configmenu = new wxMenu; /* Library */ Loading Loading @@ -423,9 +410,7 @@ void SCH_EDIT_FRAME::ReCreateMenuBar() configmenu->Append( item ); /** * Help Menu */ // Help Menu wxMenu* helpMenu = new wxMenu; AddHelpVersionInfoMenuEntry( helpMenu ); Loading @@ -446,9 +431,7 @@ void SCH_EDIT_FRAME::ReCreateMenuBar() #endif /* !defined(__WXMAC__) */ /** * Create the menubar and append all submenus */ // Create the menubar and append all submenus menuBar->Append( filesMenu, _( "&File" ) ); menuBar->Append( editMenu, _( "&Edit" ) ); menuBar->Append( viewMenu, _( "&View" ) ); Loading @@ -456,6 +439,11 @@ void SCH_EDIT_FRAME::ReCreateMenuBar() menuBar->Append( configmenu, _( "&Preferences" ) ); menuBar->Append( helpMenu, _( "&Help" ) ); /* Associate the menu bar with the frame */ menuBar->Thaw(); // Associate the menu bar with the frame, if no previous menubar if( GetMenuBar() == NULL ) SetMenuBar( menuBar ); else menuBar->Refresh(); }