From 709fe07e6d6bceae13074b0df05a3c618d7db024 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Tue, 5 Apr 2011 21:24:12 +0200 Subject: [PATCH] All: fix a very minor issue: when a window is closed mazimized, and later reopened, it was not maximized. --- common/basicframe.cpp | 8 + pcbnew/dialogs/dialog_design_rules_base.cpp | 2 +- pcbnew/dialogs/dialog_design_rules_base.fbp | 1037 +++++++++++++++++++ pcbnew/dialogs/dialog_design_rules_base.h | 4 +- 4 files changed, 1048 insertions(+), 3 deletions(-) diff --git a/common/basicframe.cpp b/common/basicframe.cpp index 779a348817..5b7f19d169 100644 --- a/common/basicframe.cpp +++ b/common/basicframe.cpp @@ -113,6 +113,7 @@ void EDA_BASE_FRAME::LoadSettings() config = wxGetApp().m_EDA_Config; + int maximized = 0; if( config ) { text = m_FrameName + wxT( "Pos_x" ); @@ -123,6 +124,8 @@ void EDA_BASE_FRAME::LoadSettings() config->Read( text, &m_FrameSize.x, 600 ); text = m_FrameName + wxT( "Size_y" ); config->Read( text, &m_FrameSize.y, 400 ); + text = m_FrameName + wxT( "Maximized" ); + config->Read( text, &maximized, 0 ); } // Ensure Window title bar is visible @@ -135,6 +138,9 @@ void EDA_BASE_FRAME::LoadSettings() #endif if( m_FramePos.y < Ypos_min ) m_FramePos.y = Ypos_min; + + if( maximized ) + Maximize(); } @@ -166,6 +172,8 @@ void EDA_BASE_FRAME::SaveSettings() config->Write( text, (long) m_FrameSize.x ); text = m_FrameName + wxT( "Size_y" ); config->Write( text, (long) m_FrameSize.y ); + text = m_FrameName + wxT( "Maximized" ); + config->Write( text, IsMaximized() ); } diff --git a/pcbnew/dialogs/dialog_design_rules_base.cpp b/pcbnew/dialogs/dialog_design_rules_base.cpp index 2ccf2c0751..8eac60edcb 100644 --- a/pcbnew/dialogs/dialog_design_rules_base.cpp +++ b/pcbnew/dialogs/dialog_design_rules_base.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Sep 8 2010) +// C++ code generated with wxFormBuilder (version Nov 17 2010) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! diff --git a/pcbnew/dialogs/dialog_design_rules_base.fbp b/pcbnew/dialogs/dialog_design_rules_base.fbp index d611b5bd43..3379fb5233 100644 --- a/pcbnew/dialogs/dialog_design_rules_base.fbp +++ b/pcbnew/dialogs/dialog_design_rules_base.fbp @@ -22,25 +22,54 @@ 1 0 + 1 + 1 + 1 + 1 + 0 + + + 1 + 0 + 1 1 + 0 + Dock + 0 + Left 1 impl_virtual + 1 + 0 0 wxID_ANY + + 0 + 0 -1,-1 + 1 DIALOG_DESIGN_RULES_BASE + 1 + + + 1 + + Resizable + + 1 777,640 wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER Design Rules Editor + 0 wxFILTER_NONE @@ -89,23 +118,51 @@ wxEXPAND|wxRIGHT|wxLEFT 1 + 1 + 1 + 1 + 1 + + + 1 + 0 + 1 1 + 0 + Dock + 0 + Left 1 + 1 + 0 0 wxID_ANY + + 0 + 0 + 1 m_DRnotebook + 1 + + protected + 1 + + Resizable + + 1 wxNB_TOP + 0 wxFILTER_NONE @@ -144,21 +201,49 @@ Net Classes Editor 1 + 1 + 1 + 1 + 1 + + + 1 + 0 + 1 1 + 0 + Dock + 0 + Left 1 + 1 + 0 0 wxID_ANY + + 0 + 0 + 1 m_panelNetClassesEditor + 1 + + protected + 1 + + Resizable + + 1 + 0 wxFILTER_NONE @@ -212,14 +297,23 @@ wxEXPAND 1 + 1 + 1 + 1 + 1 + 0 1 + + 1 wxALIGN_LEFT wxALIGN_TOP + 0 + 1 wxALIGN_CENTRE 40 "Clearance" "Track Width" "Via Dia" "Via Drill" "uVia Dia" "uVia Drill" @@ -228,6 +322,10 @@ 100,120,84,85,81,90 1 + 0 + Dock + 0 + Left 0 1 0 @@ -235,29 +333,44 @@ 1 1 + 1 1 + 0 0 wxID_ANY + 0 0 + 0 + 0 -1,-1 + 1 m_grid + 1 + + protected + 1 + + Resizable + wxALIGN_LEFT 120 "Default" wxALIGN_CENTRE 1 + 1 + 0 Net Class parameters wxFILTER_NONE @@ -337,24 +450,52 @@ wxALIGN_CENTER_HORIZONTAL|wxTOP|wxRIGHT|wxLEFT 0 + 1 + 1 + 1 + 1 + + + 1 + 0 + 1 1 0 + 0 + Dock + 0 + Left 1 + 1 + 0 0 wxID_ADD_NETCLASS Add + + 0 + 0 + 1 m_addButton + 1 + + protected + 1 + + Resizable + + 1 + 0 Add another Net Class wxFILTER_NONE @@ -394,24 +535,52 @@ wxALIGN_CENTER_HORIZONTAL|wxTOP|wxRIGHT|wxLEFT 0 + 1 + 1 + 1 + 1 + + + 1 + 0 + 1 1 0 + 0 + Dock + 0 + Left 1 + 1 + 0 0 wxID_REMOVE_NETCLASS Remove + + 0 + 0 + 1 m_removeButton + 1 + + protected + 1 + + Resizable + + 1 + 0 Remove the currently select Net Class The default Net Class cannot be removed wxFILTER_NONE @@ -451,24 +620,52 @@ wxTOP|wxRIGHT|wxLEFT 0 + 1 + 1 + 1 + 1 + + + 1 + 0 + 1 1 0 + 0 + Dock + 0 + Left 1 + 1 + 0 0 wxID_ANY Move Up + + 0 + 0 + 1 m_moveUpButton + 1 + + protected + 1 + + Resizable + + 1 + 0 Move the currently selected Net Class up one row wxFILTER_NONE @@ -533,23 +730,51 @@ wxEXPAND 0 + 1 + 1 + 1 + 1 + + + 1 + 0 + 1 1 + 0 + Dock + 0 + Left 1 + 1 + 0 0 ID_LEFT_CHOICE_CLICK + + 0 + 0 + 1 m_leftClassChoice + 1 + + protected + 1 + + Resizable + 0 + 1 + 0 wxFILTER_NONE @@ -589,22 +814,50 @@ wxEXPAND|wxTOP 1 + 1 + 1 + 1 + 1 + + + 1 + 0 + 1 1 + 0 + Dock + 0 + Left 1 + 1 + 0 0 wxID_ANY + + 0 + 0 220,200 + 1 m_leftListCtrl + 1 + + protected + 1 + + Resizable + + 1 wxLC_HRULES|wxLC_REPORT|wxLC_VIRTUAL|wxLC_VRULES NETS_LIST_CTRL; dialog_design_rules_aux_helper_class.h + 0 wxFILTER_NONE @@ -674,24 +927,52 @@ wxALL|wxALIGN_CENTER_HORIZONTAL 0 + 1 + 1 + 1 + 1 + + + 1 + 0 + 1 1 0 + 0 + Dock + 0 + Left 1 + 1 + 0 0 ID_LEFT_TO_RIGHT_COPY <<< + + 0 + 0 + 1 m_buttonRightToLeft + 1 + + protected + 1 + + Resizable + + 1 + 0 Move the selected nets in the right list to the left list wxFILTER_NONE @@ -731,24 +1012,52 @@ wxALL|wxALIGN_CENTER_HORIZONTAL 0 + 1 + 1 + 1 + 1 + + + 1 + 0 + 1 1 0 + 0 + Dock + 0 + Left 1 + 1 + 0 0 ID_RIGHT_TO_LEFT_COPY >>> + + 0 + 0 + 1 m_buttonLeftToRight + 1 + + protected + 1 + + Resizable + + 1 + 0 Move the selected nets in the left list to the right list wxFILTER_NONE @@ -788,24 +1097,52 @@ wxALL|wxALIGN_CENTER_HORIZONTAL 0 + 1 + 1 + 1 + 1 + + + 1 + 0 + 1 1 0 + 0 + Dock + 0 + Left 1 + 1 + 0 0 wxID_ANY << Select All + + 0 + 0 + 1 m_buttonLeftSelAll + 1 + + protected + 1 + + Resizable + + 1 + 0 Select all nets in the left list wxFILTER_NONE @@ -845,24 +1182,52 @@ wxALIGN_BOTTOM|wxALL|wxALIGN_CENTER_HORIZONTAL 0 + 1 + 1 + 1 + 1 + + + 1 + 0 + 1 1 0 + 0 + Dock + 0 + Left 1 + 1 + 0 0 wxID_ANY Select All >> + + 0 + 0 + 1 m_buttonRightSelAll + 1 + + protected + 1 + + Resizable + + 1 + 0 Select all nets in the right list wxFILTER_NONE @@ -913,23 +1278,51 @@ wxEXPAND 0 + 1 + 1 + 1 + 1 + + + 1 + 0 + 1 1 + 0 + Dock + 0 + Left 1 + 1 + 0 0 ID_RIGHT_CHOICE_CLICK + + 0 + 0 + 1 m_rightClassChoice + 1 + + protected + 1 + + Resizable + 0 + 1 + 0 wxFILTER_NONE @@ -969,22 +1362,50 @@ wxEXPAND|wxTOP 1 + 1 + 1 + 1 + 1 + + + 1 + 0 + 1 1 + 0 + Dock + 0 + Left 1 + 1 + 0 0 wxID_ANY + + 0 + 0 220,-1 + 1 m_rightListCtrl + 1 + + protected + 1 + + Resizable + + 1 wxLC_HRULES|wxLC_REPORT|wxLC_VIRTUAL|wxLC_VRULES NETS_LIST_CTRL; dialog_design_rules_aux_helper_class.h + 0 wxFILTER_NONE @@ -1050,21 +1471,49 @@ Global Design Rules 0 + 1 + 1 + 1 + 1 + + + 1 + 0 + 1 1 + 0 + Dock + 0 + Left 1 + 1 + 0 0 wxID_ANY + + 0 + 0 + 1 m_panelGolbalDesignRules + 1 + + protected + 1 + + Resizable + + 1 + 0 wxFILTER_NONE @@ -1127,26 +1576,54 @@ wxALL|wxEXPAND 0 + 1 + 1 + 1 + 1 + + + 1 + 0 "Through via" "Blind or buried via" + 1 1 + 0 + Dock + 0 + Left 1 + 1 + 0 0 wxID_ANY Default Via Type + 1 + 0 + 0 + 1 m_OptViaType + 1 + + protected + 1 + + Resizable + 0 + 1 wxRA_SPECIFY_COLS + 0 Select the current via type. Trough via is the usual selection wxFILTER_NONE @@ -1202,23 +1679,51 @@ wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT 0 + 1 + 1 + 1 + 1 + + + 1 + 0 + 1 1 + 0 + Dock + 0 + Left 1 + 1 + 0 0 wxID_ANY Min via diameter + + 0 + 0 + 1 m_ViaMinTitle + 1 + + protected + 1 + + Resizable + + 1 + 0 wxFILTER_NONE @@ -1258,23 +1763,51 @@ wxEXPAND|wxALL 0 + 1 + 1 + 1 + 1 + + + 1 + 0 + 1 1 + 0 + Dock + 0 + Left 1 + 1 + 0 0 wxID_ANY + + 0 0 + 0 + 1 m_SetViasMinSizeCtrl + 1 + + protected + 1 + + Resizable + + 1 + 0 wxFILTER_NONE @@ -1318,23 +1851,51 @@ wxTOP|wxBOTTOM|wxLEFT|wxALIGN_RIGHT 0 + 1 + 1 + 1 + 1 + + + 1 + 0 + 1 1 + 0 + Dock + 0 + Left 1 + 1 + 0 0 wxID_ANY Min via drill dia + + 0 + 0 + 1 m_ViaMinDrillTitle + 1 + + protected + 1 + + Resizable + + 1 + 0 wxFILTER_NONE @@ -1374,23 +1935,51 @@ wxALL|wxEXPAND 0 + 1 + 1 + 1 + 1 + + + 1 + 0 + 1 1 + 0 + Dock + 0 + Left 1 + 1 + 0 0 wxID_ANY + + 0 0 + 0 + 1 m_SetViasMinDrillCtrl + 1 + + protected + 1 + + Resizable + + 1 + 0 wxFILTER_NONE @@ -1450,26 +2039,54 @@ wxALL|wxEXPAND 0 + 1 + 1 + 1 + 1 + + + 1 + 0 "Do not allow micro vias" "Allow micro vias" + 1 1 + 0 + Dock + 0 + Left 1 + 1 + 0 0 wxID_ANY Micro Vias: + 1 + 0 + 0 + 1 m_AllowMicroViaCtrl + 1 + + protected + 1 + + Resizable + 0 + 1 wxRA_SPECIFY_COLS + 0 Allows or do not allow use of micro vias They are very small vias only from an external copper layer to its near neightbour wxFILTER_NONE @@ -1525,23 +2142,51 @@ wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT 0 + 1 + 1 + 1 + 1 + + + 1 + 0 + 1 1 + 0 + Dock + 0 + Left 1 + 1 + 0 0 wxID_ANY Min uvia diameter + + 0 + 0 + 1 m_MicroViaMinSizeTitle + 1 + + protected + 1 + + Resizable + + 1 + 0 wxFILTER_NONE @@ -1581,23 +2226,51 @@ wxALL|wxEXPAND 0 + 1 + 1 + 1 + 1 + + + 1 + 0 + 1 1 + 0 + Dock + 0 + Left 1 + 1 + 0 0 wxID_ANY + + 0 6 + 0 + 1 m_SetMicroViasMinSizeCtrl + 1 + + protected + 1 + + Resizable + + 1 + 0 wxFILTER_NONE @@ -1641,23 +2314,51 @@ wxALIGN_RIGHT|wxTOP|wxBOTTOM|wxLEFT 0 + 1 + 1 + 1 + 1 + + + 1 + 0 + 1 1 + 0 + Dock + 0 + Left 1 + 1 + 0 0 wxID_ANY Min uvia drill dia + + 0 + 0 + 1 m_MicroViaMinDrillTitle + 1 + + protected + 1 + + Resizable + + 1 + 0 wxFILTER_NONE @@ -1697,23 +2398,51 @@ wxALL|wxEXPAND 0 + 1 + 1 + 1 + 1 + + + 1 + 0 + 1 1 + 0 + Dock + 0 + Left 1 + 1 + 0 0 wxID_ANY + + 0 6 + 0 + 1 m_SetMicroViasMinDrillCtrl + 1 + + protected + 1 + + Resizable + + 1 + 0 wxFILTER_NONE @@ -1789,23 +2518,51 @@ wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxTOP|wxBOTTOM|wxLEFT 0 + 1 + 1 + 1 + 1 + + + 1 + 0 + 1 1 + 0 + Dock + 0 + Left 1 + 1 + 0 0 wxID_ANY Min track width + + 0 + 0 + 1 m_TrackMinWidthTitle + 1 + + protected + 1 + + Resizable + + 1 + 0 wxFILTER_NONE @@ -1845,23 +2602,51 @@ wxALL|wxEXPAND 0 + 1 + 1 + 1 + 1 + + + 1 + 0 + 1 1 + 0 + Dock + 0 + Left 1 + 1 + 0 0 wxID_ANY + + 0 0 + 0 + 1 m_SetTrackMinWidthCtrl + 1 + + protected + 1 + + Resizable + + 1 + 0 wxFILTER_NONE @@ -1911,22 +2696,50 @@ wxEXPAND | wxALL 0 + 1 + 1 + 1 + 1 + + + 1 + 0 + 1 1 + 0 + Dock + 0 + Left 1 + 1 + 0 0 wxID_ANY + + 0 + 0 + 1 m_staticline1 + 1 + + protected + 1 + + Resizable + + 1 wxLI_HORIZONTAL + 0 wxFILTER_NONE @@ -1965,23 +2778,51 @@ wxALL|wxALIGN_CENTER_HORIZONTAL 0 + 1 + 1 + 1 + 1 + + + 1 + 0 + 1 1 + 0 + Dock + 0 + Left 1 + 1 + 0 0 wxID_ANY Specific via diameters and track widths, which can be used to replace default Netclass values on demand, for arbitrary via or track segments. + + 0 + 0 + 1 m_staticTextInfo + 1 + + protected + 1 + + Resizable + + 1 + 0 wxFILTER_NONE @@ -2042,23 +2883,51 @@ wxALL 0 + 1 + 1 + 1 + 1 + + + 1 + 0 + 1 1 + 0 + Dock + 0 + Left 1 + 1 + 0 0 wxID_ANY Drill value: a blank or 0 => default Netclass value + + 0 + 0 + 1 m_staticText7 + 1 + + protected + 1 + + Resizable + + 1 + 0 wxFILTER_NONE @@ -2098,14 +2967,23 @@ wxALL|wxEXPAND 0 + 1 + 1 + 1 + 1 + 0 0 + + 1 wxALIGN_LEFT wxALIGN_TOP + 0 + 1 wxALIGN_CENTRE 30 "Diameter" "Drill" @@ -2114,6 +2992,10 @@ 1 + 0 + Dock + 0 + Left 0 1 0 @@ -2121,29 +3003,44 @@ 1 1 + 1 1 + 0 0 wxID_ANY + 0 0 + 0 + 0 + 1 m_gridViaSizeList + 1 + + protected + 1 + + Resizable + wxALIGN_CENTRE 80 "Via 1" "Via 2" "Via 3" "Via 4" "Via 5" "Via 6" "Via 7" wxALIGN_CENTRE 7 + 1 + 0 wxFILTER_NONE @@ -2228,23 +3125,51 @@ wxALL 0 + 1 + 1 + 1 + 1 + + + 1 + 0 + 1 1 + 0 + Dock + 0 + Left 1 + 1 + 0 0 wxID_ANY + + 0 + 0 + 1 m_staticText8 + 1 + + protected + 1 + + Resizable + + 1 + 0 wxFILTER_NONE @@ -2284,14 +3209,23 @@ wxALL|wxEXPAND 0 + 1 + 1 + 1 + 1 + 0 0 + + 1 wxALIGN_LEFT wxALIGN_TOP + 0 + 1 wxALIGN_CENTRE 30 "Width" @@ -2300,6 +3234,10 @@ 1 + 0 + Dock + 0 + Left 0 1 0 @@ -2307,29 +3245,44 @@ 1 1 + 1 1 + 0 0 wxID_ANY + 0 0 + 0 + 0 + 1 m_gridTrackWidthList + 1 + + protected + 1 + + Resizable + wxALIGN_CENTRE 80 "Track 1" "Track 2" "Track 3" "Track 4" "Track 5" "Track 6" "Track 7" wxALIGN_CENTRE 7 + 1 + 0 wxFILTER_NONE @@ -2421,22 +3374,50 @@ wxEXPAND 1 + 1 + 1 + 1 + 1 + + + 1 + 0 + 1 1 + 0 + Dock + 0 + Left 1 + 1 + 0 0 wxID_ANY + + 0 + 0 -1,90 + 1 m_MessagesList + 1 + + protected + 1 + + Resizable + + 1 wxHW_SCROLLBAR_AUTO + 0 wxFILTER_NONE @@ -2487,24 +3468,52 @@ wxALL|wxEXPAND 0 + 1 + 1 + 1 + 1 + + + 1 + 0 + 1 1 1 + 0 + Dock + 0 + Left 1 + 1 + 0 0 wxID_OK OK + + 0 + 0 + 1 m_buttonOk + 1 + + protected + 1 + + Resizable + + 1 + 0 wxFILTER_NONE @@ -2544,24 +3553,52 @@ wxALL|wxEXPAND 0 + 1 + 1 + 1 + 1 + + + 1 + 0 + 1 1 0 + 0 + Dock + 0 + Left 1 + 1 + 0 0 wxID_CANCEL Cancel + + 0 + 0 + 1 m_buttonCancel + 1 + + protected + 1 + + Resizable + + 1 + 0 wxFILTER_NONE diff --git a/pcbnew/dialogs/dialog_design_rules_base.h b/pcbnew/dialogs/dialog_design_rules_base.h index 48a36fa5d6..d328755970 100644 --- a/pcbnew/dialogs/dialog_design_rules_base.h +++ b/pcbnew/dialogs/dialog_design_rules_base.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Sep 8 2010) +// C++ code generated with wxFormBuilder (version Nov 17 2010) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! @@ -110,7 +110,7 @@ class DIALOG_DESIGN_RULES_BASE : public wxDialog public: - DIALOG_DESIGN_RULES_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Design Rules Editor"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 777,640 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); + DIALOG_DESIGN_RULES_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Design Rules Editor"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 777,640 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); ~DIALOG_DESIGN_RULES_BASE(); };