Commit f65ae5cd authored by dickelbeck's avatar dickelbeck

drc dialog was not showing the Netclass non-editable field on large font...

drc dialog was not showing the Netclass non-editable field on large font systems.  remember last size and position
parent 8c36cbf4
...@@ -13,6 +13,12 @@ ...@@ -13,6 +13,12 @@
#include "wxPcbStruct.h" #include "wxPcbStruct.h"
#include "class_board_design_settings.h" #include "class_board_design_settings.h"
// dialog should remember its previous screen position and size
wxPoint DIALOG_DRC_CONTROL::s_LastPos( -1, -1 );
wxSize DIALOG_DRC_CONTROL::s_LastSize;
/* class DIALOG_DRC_CONTROL: a dialog to set DRC parameters (clearance, min cooper size) /* class DIALOG_DRC_CONTROL: a dialog to set DRC parameters (clearance, min cooper size)
* and run DRC tests * and run DRC tests
*/ */
...@@ -28,6 +34,12 @@ DIALOG_DRC_CONTROL::DIALOG_DRC_CONTROL( DRC* aTester, WinEDA_PcbFrame* parent ) ...@@ -28,6 +34,12 @@ DIALOG_DRC_CONTROL::DIALOG_DRC_CONTROL( DRC* aTester, WinEDA_PcbFrame* parent )
{ {
GetSizer()->SetSizeHints( this ); GetSizer()->SetSizeHints( this );
} }
if( s_LastPos.x != -1 )
{
SetSize( s_LastSize );
SetPosition( s_LastPos );
}
} }
...@@ -50,7 +62,10 @@ void DIALOG_DRC_CONTROL::InitValues() ...@@ -50,7 +62,10 @@ void DIALOG_DRC_CONTROL::InitValues()
AddUnitSymbol( *m_TrackMinWidthTitle ); AddUnitSymbol( *m_TrackMinWidthTitle );
AddUnitSymbol( *m_ViaMinTitle ); AddUnitSymbol( *m_ViaMinTitle );
AddUnitSymbol( *m_MicroViaMinTitle ); AddUnitSymbol( *m_MicroViaMinTitle );
/* this looks terrible! does not fit into text field, do it in wxformbuilder instead
m_SetClearance->SetValue( _("Netclasses values")); m_SetClearance->SetValue( _("Netclasses values"));
*/
Layout(); // adding the units above expanded Clearance text, now resize. Layout(); // adding the units above expanded Clearance text, now resize.
...@@ -252,6 +267,11 @@ void DIALOG_DRC_CONTROL::OnOkClick( wxCommandEvent& event ) ...@@ -252,6 +267,11 @@ void DIALOG_DRC_CONTROL::OnOkClick( wxCommandEvent& event )
{ {
SetReturnCode( wxID_OK ); SetReturnCode( wxID_OK );
SetDrcParmeters( ); SetDrcParmeters( );
// Save the dialog's position before finishing
s_LastPos = GetPosition();
s_LastSize = GetSize();
m_tester->DestroyDialog( wxID_OK ); m_tester->DestroyDialog( wxID_OK );
} }
...@@ -263,6 +283,11 @@ void DIALOG_DRC_CONTROL::OnOkClick( wxCommandEvent& event ) ...@@ -263,6 +283,11 @@ void DIALOG_DRC_CONTROL::OnOkClick( wxCommandEvent& event )
void DIALOG_DRC_CONTROL::OnCancelClick( wxCommandEvent& event ) void DIALOG_DRC_CONTROL::OnCancelClick( wxCommandEvent& event )
{ {
SetReturnCode( wxID_CANCEL ); SetReturnCode( wxID_CANCEL );
// Save the dialog's position before finishing
s_LastPos = GetPosition();
s_LastSize = GetSize();
m_tester->DestroyDialog( wxID_CANCEL ); m_tester->DestroyDialog( wxID_CANCEL );
} }
......
...@@ -43,6 +43,11 @@ public: ...@@ -43,6 +43,11 @@ public:
~DIALOG_DRC_CONTROL(){}; ~DIALOG_DRC_CONTROL(){};
private: private:
static wxSize s_LastSize; ///< last position and size
static wxPoint s_LastPos;
/** /**
* Function writeReport * Function writeReport
* outputs the MARKER items and unconnecte DRC_ITEMs with commentary to an * outputs the MARKER items and unconnecte DRC_ITEMs with commentary to an
......
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Apr 16 2008) // C++ code generated with wxFormBuilder (version Dec 29 2008)
// http://www.wxformbuilder.org/ // http://www.wxformbuilder.org/
// //
// PLEASE DO "NOT" EDIT THIS FILE! // PLEASE DO "NOT" EDIT THIS FILE!
...@@ -28,36 +28,37 @@ DIALOG_DRC_CONTROL_BASE::DIALOG_DRC_CONTROL_BASE( wxWindow* parent, wxWindowID i ...@@ -28,36 +28,37 @@ DIALOG_DRC_CONTROL_BASE::DIALOG_DRC_CONTROL_BASE( wxWindow* parent, wxWindowID i
bSizer7 = new wxBoxSizer( wxVERTICAL ); bSizer7 = new wxBoxSizer( wxVERTICAL );
wxFlexGridSizer* fgMinValuesSizer; wxFlexGridSizer* fgMinValuesSizer;
fgMinValuesSizer = new wxFlexGridSizer( 2, 4, 0, 0 ); fgMinValuesSizer = new wxFlexGridSizer( 4, 2, 0, 0 );
fgMinValuesSizer->SetFlexibleDirection( wxBOTH ); fgMinValuesSizer->AddGrowableCol( 1 );
fgMinValuesSizer->SetFlexibleDirection( wxHORIZONTAL );
fgMinValuesSizer->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); fgMinValuesSizer->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
m_ClearanceTitle = new wxStaticText( this, wxID_ANY, _("Clearance"), wxDefaultPosition, wxDefaultSize, 0 ); m_ClearanceTitle = new wxStaticText( this, wxID_ANY, _("Clearance"), wxDefaultPosition, wxDefaultSize, 0 );
m_ClearanceTitle->Wrap( -1 ); m_ClearanceTitle->Wrap( -1 );
fgMinValuesSizer->Add( m_ClearanceTitle, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT|wxALIGN_RIGHT, 5 ); fgMinValuesSizer->Add( m_ClearanceTitle, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL, 5 );
m_SetClearance = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); m_SetClearance = new wxTextCtrl( this, wxID_ANY, _("By Netclass"), wxDefaultPosition, wxDefaultSize, 0 );
m_SetClearance->Enable( false ); m_SetClearance->Enable( false );
fgMinValuesSizer->Add( m_SetClearance, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); fgMinValuesSizer->Add( m_SetClearance, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 5 );
m_ViaMinTitle = new wxStaticText( this, wxID_ANY, _("Via Min Size"), wxDefaultPosition, wxDefaultSize, 0 );
m_ViaMinTitle->Wrap( -1 );
fgMinValuesSizer->Add( m_ViaMinTitle, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT|wxALIGN_RIGHT, 5 );
m_SetViaMinSizeCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_SetViaMinSizeCtrl->SetToolTip( _("In the clearance units, enter the clearance distance") );
fgMinValuesSizer->Add( m_SetViaMinSizeCtrl, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
m_TrackMinWidthTitle = new wxStaticText( this, wxID_ANY, _("Track Min Width"), wxDefaultPosition, wxDefaultSize, 0 ); m_TrackMinWidthTitle = new wxStaticText( this, wxID_ANY, _("Track Min Width"), wxDefaultPosition, wxDefaultSize, 0 );
m_TrackMinWidthTitle->Wrap( -1 ); m_TrackMinWidthTitle->Wrap( -1 );
fgMinValuesSizer->Add( m_TrackMinWidthTitle, 0, wxALIGN_RIGHT|wxTOP|wxBOTTOM|wxLEFT, 5 ); fgMinValuesSizer->Add( m_TrackMinWidthTitle, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL, 5 );
m_SetTrackMinWidthCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); m_SetTrackMinWidthCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_SetTrackMinWidthCtrl->SetToolTip( _("In the clearance units, enter the clearance distance") ); m_SetTrackMinWidthCtrl->SetToolTip( _("In the clearance units, enter the clearance distance") );
fgMinValuesSizer->Add( m_SetTrackMinWidthCtrl, 0, wxALL, 5 ); fgMinValuesSizer->Add( m_SetTrackMinWidthCtrl, 0, wxALL|wxEXPAND, 5 );
m_ViaMinTitle = new wxStaticText( this, wxID_ANY, _("Via Min Size"), wxDefaultPosition, wxDefaultSize, 0 );
m_ViaMinTitle->Wrap( -1 );
fgMinValuesSizer->Add( m_ViaMinTitle, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL, 5 );
m_SetViaMinSizeCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_SetViaMinSizeCtrl->SetToolTip( _("In the clearance units, enter the clearance distance") );
fgMinValuesSizer->Add( m_SetViaMinSizeCtrl, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 5 );
m_MicroViaMinTitle = new wxStaticText( this, wxID_ANY, _("MicroVia Min Size"), wxDefaultPosition, wxDefaultSize, 0 ); m_MicroViaMinTitle = new wxStaticText( this, wxID_ANY, _("MicroVia Min Size"), wxDefaultPosition, wxDefaultSize, 0 );
m_MicroViaMinTitle->Wrap( -1 ); m_MicroViaMinTitle->Wrap( -1 );
...@@ -66,7 +67,7 @@ DIALOG_DRC_CONTROL_BASE::DIALOG_DRC_CONTROL_BASE( wxWindow* parent, wxWindowID i ...@@ -66,7 +67,7 @@ DIALOG_DRC_CONTROL_BASE::DIALOG_DRC_CONTROL_BASE( wxWindow* parent, wxWindowID i
m_SetMicroViakMinSizeCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); m_SetMicroViakMinSizeCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_SetMicroViakMinSizeCtrl->SetToolTip( _("In the clearance units, enter the clearance distance") ); m_SetMicroViakMinSizeCtrl->SetToolTip( _("In the clearance units, enter the clearance distance") );
fgMinValuesSizer->Add( m_SetMicroViakMinSizeCtrl, 0, wxALL, 5 ); fgMinValuesSizer->Add( m_SetMicroViakMinSizeCtrl, 0, wxALL|wxEXPAND, 5 );
bSizer7->Add( fgMinValuesSizer, 1, wxEXPAND, 5 ); bSizer7->Add( fgMinValuesSizer, 1, wxEXPAND, 5 );
...@@ -88,11 +89,11 @@ DIALOG_DRC_CONTROL_BASE::DIALOG_DRC_CONTROL_BASE( wxWindow* parent, wxWindowID i ...@@ -88,11 +89,11 @@ DIALOG_DRC_CONTROL_BASE::DIALOG_DRC_CONTROL_BASE( wxWindow* parent, wxWindowID i
m_BrowseButton = new wxButton( this, ID_BUTTON_BROWSE_RPT_FILE, _("..."), wxDefaultPosition, wxDefaultSize, 0 ); m_BrowseButton = new wxButton( this, ID_BUTTON_BROWSE_RPT_FILE, _("..."), wxDefaultPosition, wxDefaultSize, 0 );
ReportFileSizer->Add( m_BrowseButton, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); ReportFileSizer->Add( m_BrowseButton, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
bSizer7->Add( ReportFileSizer, 1, wxEXPAND|wxTOP|wxBOTTOM|wxRIGHT, 5 ); bSizer7->Add( ReportFileSizer, 0, wxEXPAND|wxTOP|wxBOTTOM|wxRIGHT, 5 );
sbSizerOptions->Add( bSizer7, 1, wxEXPAND, 5 ); sbSizerOptions->Add( bSizer7, 1, wxEXPAND, 5 );
m_CommandSizer->Add( sbSizerOptions, 0, 0, 5 ); m_CommandSizer->Add( sbSizerOptions, 1, 0, 5 );
wxBoxSizer* bSizerMessages; wxBoxSizer* bSizerMessages;
bSizerMessages = new wxBoxSizer( wxVERTICAL ); bSizerMessages = new wxBoxSizer( wxVERTICAL );
...@@ -102,8 +103,6 @@ DIALOG_DRC_CONTROL_BASE::DIALOG_DRC_CONTROL_BASE( wxWindow* parent, wxWindowID i ...@@ -102,8 +103,6 @@ DIALOG_DRC_CONTROL_BASE::DIALOG_DRC_CONTROL_BASE( wxWindow* parent, wxWindowID i
bSizerMessages->Add( m_staticText6, 0, wxRIGHT|wxLEFT, 5 ); bSizerMessages->Add( m_staticText6, 0, wxRIGHT|wxLEFT, 5 );
m_Messages = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxTE_MULTILINE|wxTE_READONLY ); m_Messages = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxTE_MULTILINE|wxTE_READONLY );
m_Messages->SetMinSize( wxSize( 160,-1 ) );
bSizerMessages->Add( m_Messages, 1, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 ); bSizerMessages->Add( m_Messages, 1, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
m_CommandSizer->Add( bSizerMessages, 1, wxEXPAND, 5 ); m_CommandSizer->Add( bSizerMessages, 1, wxEXPAND, 5 );
...@@ -147,7 +146,6 @@ DIALOG_DRC_CONTROL_BASE::DIALOG_DRC_CONTROL_BASE( wxWindow* parent, wxWindowID i ...@@ -147,7 +146,6 @@ DIALOG_DRC_CONTROL_BASE::DIALOG_DRC_CONTROL_BASE( wxWindow* parent, wxWindowID i
m_ClearanceListBox = new DRCLISTBOX( m_panelClearanceListBox, ID_CLEARANCE_LIST, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 ); m_ClearanceListBox = new DRCLISTBOX( m_panelClearanceListBox, ID_CLEARANCE_LIST, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
m_ClearanceListBox->SetToolTip( _("MARKERs, double click any to go there in PCB, right click for popup menu") ); m_ClearanceListBox->SetToolTip( _("MARKERs, double click any to go there in PCB, right click for popup menu") );
m_ClearanceListBox->SetMinSize( wxSize( 450,300 ) );
bSizeClearanceBox->Add( m_ClearanceListBox, 1, wxALL|wxEXPAND, 5 ); bSizeClearanceBox->Add( m_ClearanceListBox, 1, wxALL|wxEXPAND, 5 );
...@@ -181,6 +179,7 @@ DIALOG_DRC_CONTROL_BASE::DIALOG_DRC_CONTROL_BASE( wxWindow* parent, wxWindowID i ...@@ -181,6 +179,7 @@ DIALOG_DRC_CONTROL_BASE::DIALOG_DRC_CONTROL_BASE( wxWindow* parent, wxWindowID i
this->SetSizer( m_MainSizer ); this->SetSizer( m_MainSizer );
this->Layout(); this->Layout();
m_MainSizer->Fit( this );
// Connect Events // Connect Events
m_CreateRptCtrl->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_DRC_CONTROL_BASE::OnReportCheckBoxClicked ), NULL, this ); m_CreateRptCtrl->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_DRC_CONTROL_BASE::OnReportCheckBoxClicked ), NULL, this );
......
This diff is collapsed.
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Apr 16 2008) // C++ code generated with wxFormBuilder (version Dec 29 2008)
// http://www.wxformbuilder.org/ // http://www.wxformbuilder.org/
// //
// PLEASE DO "NOT" EDIT THIS FILE! // PLEASE DO "NOT" EDIT THIS FILE!
...@@ -51,8 +51,8 @@ class DIALOG_DRC_CONTROL_BASE : public wxDialog ...@@ -51,8 +51,8 @@ class DIALOG_DRC_CONTROL_BASE : public wxDialog
protected: protected:
wxStaticText* m_ClearanceTitle; wxStaticText* m_ClearanceTitle;
wxStaticText* m_ViaMinTitle;
wxStaticText* m_TrackMinWidthTitle; wxStaticText* m_TrackMinWidthTitle;
wxStaticText* m_ViaMinTitle;
wxStaticText* m_MicroViaMinTitle; wxStaticText* m_MicroViaMinTitle;
wxButton* m_BrowseButton; wxButton* m_BrowseButton;
wxStaticText* m_staticText6; wxStaticText* m_staticText6;
...@@ -86,14 +86,14 @@ class DIALOG_DRC_CONTROL_BASE : public wxDialog ...@@ -86,14 +86,14 @@ class DIALOG_DRC_CONTROL_BASE : public wxDialog
public: public:
wxTextCtrl* m_SetClearance; wxTextCtrl* m_SetClearance;
wxTextCtrl* m_SetViaMinSizeCtrl;
wxTextCtrl* m_SetTrackMinWidthCtrl; wxTextCtrl* m_SetTrackMinWidthCtrl;
wxTextCtrl* m_SetViaMinSizeCtrl;
wxTextCtrl* m_SetMicroViakMinSizeCtrl; wxTextCtrl* m_SetMicroViakMinSizeCtrl;
wxCheckBox* m_CreateRptCtrl; wxCheckBox* m_CreateRptCtrl;
wxTextCtrl* m_RptFilenameCtrl; wxTextCtrl* m_RptFilenameCtrl;
DRCLISTBOX* m_ClearanceListBox; DRCLISTBOX* m_ClearanceListBox;
DRCLISTBOX* m_UnconnectedListBox; DRCLISTBOX* m_UnconnectedListBox;
DIALOG_DRC_CONTROL_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("DRC Control"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 800,508 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); DIALOG_DRC_CONTROL_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("DRC Control"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
~DIALOG_DRC_CONTROL_BASE(); ~DIALOG_DRC_CONTROL_BASE();
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment