From 195fbbaf2314570c60434031c98601fb700cde6c Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Mon, 19 Aug 2019 17:46:25 +0100 Subject: [PATCH] Reduce confusion by putting all dialog pages as leaf nodes. --- eeschema/eeschema_config.cpp | 6 ++++-- gerbview/gerbview_config.cpp | 5 +++-- pcbnew/dialogs/dialog_board_setup.cpp | 15 +++++++++------ pcbnew/footprint_edit_frame.cpp | 3 ++- pcbnew/pcbnew_config.cpp | 3 ++- 5 files changed, 20 insertions(+), 12 deletions(-) diff --git a/eeschema/eeschema_config.cpp b/eeschema/eeschema_config.cpp index 62b8b92299..4959fbae61 100644 --- a/eeschema/eeschema_config.cpp +++ b/eeschema/eeschema_config.cpp @@ -120,8 +120,9 @@ void SCH_EDIT_FRAME::InstallPreferences( PAGED_DIALOG* aParent, { wxTreebook* book = aParent->GetTreebook(); - book->AddPage( new PANEL_EESCHEMA_SETTINGS( this, book ), _( "Eeschema" ) ); + book->AddPage( new wxPanel( this ), _( "Eeschema" ) ); book->AddSubPage( new PANEL_EESCHEMA_DISPLAY_OPTIONS( this, book ), _( "Display Options" ) ); + book->AddSubPage( new PANEL_EESCHEMA_SETTINGS( this, book ), _( "Editing Options" ) ); book->AddSubPage( new PANEL_EESCHEMA_COLOR_CONFIG( this, book ), _( "Colors" ) ); book->AddSubPage( new PANEL_EESCHEMA_TEMPLATE_FIELDNAMES( this, book ), _( "Field Name Templates" ) ); @@ -460,8 +461,9 @@ void LIB_EDIT_FRAME::InstallPreferences( PAGED_DIALOG* aParent, { wxTreebook* book = aParent->GetTreebook(); - book->AddPage( new PANEL_LIBEDIT_SETTINGS( this, book ), _( "Symbol Editor" ) ); + book->AddPage( new wxPanel( this ), _( "Symbol Editor" ) ); book->AddSubPage( new PANEL_DISPLAY_OPTIONS( this, aParent ), _( "Display Options" ) ); + book->AddSubPage( new PANEL_LIBEDIT_SETTINGS( this, book ), _( "Defaults" ) ); aHotkeysPanel->AddHotKeys( GetToolManager() ); } diff --git a/gerbview/gerbview_config.cpp b/gerbview/gerbview_config.cpp index 5f818aa5be..a636477f8d 100644 --- a/gerbview/gerbview_config.cpp +++ b/gerbview/gerbview_config.cpp @@ -39,9 +39,10 @@ void GERBVIEW_FRAME::InstallPreferences( PAGED_DIALOG* aParent, { wxTreebook* book = aParent->GetTreebook(); - book->AddPage( new PANEL_GERBVIEW_SETTINGS( this, book ), _( "Gerbview" ) ); + book->AddPage( new wxPanel( this ), _( "Gerbview" ) ); book->AddSubPage( new PANEL_GERBVIEW_DISPLAY_OPTIONS( this, book ), _( "Display Options" ) ); - + book->AddSubPage( new PANEL_GERBVIEW_SETTINGS( this, book ), _( "Editing Options" ) ); + aHotkeysPanel->AddHotKeys( GetToolManager() ); } diff --git a/pcbnew/dialogs/dialog_board_setup.cpp b/pcbnew/dialogs/dialog_board_setup.cpp index c1f2a737fd..7bbcef026b 100644 --- a/pcbnew/dialogs/dialog_board_setup.cpp +++ b/pcbnew/dialogs/dialog_board_setup.cpp @@ -40,17 +40,20 @@ DIALOG_BOARD_SETUP::DIALOG_BOARD_SETUP( PCB_EDIT_FRAME* aFrame ) : m_maskAndPaste = new PANEL_SETUP_MASK_AND_PASTE( this, aFrame ); /* - * WARNING: If you change page names you MUST update callers which specifiy a - * particular page to be in sync. + * WARNING: If you change page names you MUST update calls to DoShowBoardSetupDialog(). */ - m_treebook->AddPage( m_layers, _( "Layers" ) ); - m_treebook->AddSubPage( m_textAndGraphics, _( "Text & Graphics" ) ); + m_treebook->AddPage( new wxPanel( this ), _( "Board Stack-up" ) ); + m_treebook->AddSubPage( m_layers, _( "Layers" ) ); - m_treebook->AddPage( m_constraints, _( "Design Rules" ) ); - m_treebook->AddSubPage( m_netclasses, _( "Net Classes" ) ); + m_treebook->AddPage( new wxPanel( this ), _( "Defaults" ) ); + m_treebook->AddSubPage( m_textAndGraphics, _( "Text & Graphics" ) ); m_treebook->AddSubPage( m_tracksAndVias, _( "Tracks & Vias" ) ); m_treebook->AddSubPage( m_maskAndPaste, _( "Solder Mask/Paste" ) ); + + m_treebook->AddPage( new wxPanel( this ), _( "Design Rules" ) ); + m_treebook->AddSubPage( m_constraints, _( "Constraints" ) ); + m_treebook->AddSubPage( m_netclasses, _( "Net Classes" ) ); } diff --git a/pcbnew/footprint_edit_frame.cpp b/pcbnew/footprint_edit_frame.cpp index 3159dd26e2..4ce80c9f19 100644 --- a/pcbnew/footprint_edit_frame.cpp +++ b/pcbnew/footprint_edit_frame.cpp @@ -761,8 +761,9 @@ void FOOTPRINT_EDIT_FRAME::InstallPreferences( PAGED_DIALOG* aParent, { wxTreebook* book = aParent->GetTreebook(); - book->AddPage( new PANEL_MODEDIT_SETTINGS( this, aParent ), _( "Footprint Editor" ) ); + book->AddPage( new wxPanel( this ), _( "Footprint Editor" ) ); book->AddSubPage( new PANEL_MODEDIT_DISPLAY_OPTIONS( this, aParent ), _( "Display Options" ) ); + book->AddSubPage( new PANEL_MODEDIT_SETTINGS( this, aParent ), _( "Editing Options" ) ); book->AddSubPage( new PANEL_MODEDIT_DEFAULTS( this, aParent ), _( "Default Values" ) ); aHotkeysPanel->AddHotKeys( GetToolManager() ); diff --git a/pcbnew/pcbnew_config.cpp b/pcbnew/pcbnew_config.cpp index c61d19ef4e..449eacff59 100644 --- a/pcbnew/pcbnew_config.cpp +++ b/pcbnew/pcbnew_config.cpp @@ -73,8 +73,9 @@ void PCB_EDIT_FRAME::InstallPreferences( PAGED_DIALOG* aParent, { wxTreebook* book = aParent->GetTreebook(); - book->AddPage( new PANEL_PCBNEW_SETTINGS( this, aParent ), _( "Pcbnew" ) ); + book->AddPage( new wxPanel( this ), _( "Pcbnew" ) ); book->AddSubPage( new PANEL_PCBNEW_DISPLAY_OPTIONS( this, aParent ), _( "Display Options" ) ); + book->AddSubPage( new PANEL_PCBNEW_SETTINGS( this, aParent ), _( "Editing Options" ) ); #if defined(KICAD_SCRIPTING) && defined(KICAD_SCRIPTING_ACTION_MENU) book->AddSubPage( new PANEL_PCBNEW_ACTION_PLUGINS( this, aParent ), _( "Action Plugins" ) ); #endif