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 @@
#include "wxPcbStruct.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)
* and run DRC tests
*/
......@@ -28,6 +34,12 @@ DIALOG_DRC_CONTROL::DIALOG_DRC_CONTROL( DRC* aTester, WinEDA_PcbFrame* parent )
{
GetSizer()->SetSizeHints( this );
}
if( s_LastPos.x != -1 )
{
SetSize( s_LastSize );
SetPosition( s_LastPos );
}
}
......@@ -50,7 +62,10 @@ void DIALOG_DRC_CONTROL::InitValues()
AddUnitSymbol( *m_TrackMinWidthTitle );
AddUnitSymbol( *m_ViaMinTitle );
AddUnitSymbol( *m_MicroViaMinTitle );
/* this looks terrible! does not fit into text field, do it in wxformbuilder instead
m_SetClearance->SetValue( _("Netclasses values"));
*/
Layout(); // adding the units above expanded Clearance text, now resize.
......@@ -252,6 +267,11 @@ void DIALOG_DRC_CONTROL::OnOkClick( wxCommandEvent& event )
{
SetReturnCode( wxID_OK );
SetDrcParmeters( );
// Save the dialog's position before finishing
s_LastPos = GetPosition();
s_LastSize = GetSize();
m_tester->DestroyDialog( wxID_OK );
}
......@@ -263,6 +283,11 @@ void DIALOG_DRC_CONTROL::OnOkClick( wxCommandEvent& event )
void DIALOG_DRC_CONTROL::OnCancelClick( wxCommandEvent& event )
{
SetReturnCode( wxID_CANCEL );
// Save the dialog's position before finishing
s_LastPos = GetPosition();
s_LastSize = GetSize();
m_tester->DestroyDialog( wxID_CANCEL );
}
......
......@@ -43,6 +43,11 @@ public:
~DIALOG_DRC_CONTROL(){};
private:
static wxSize s_LastSize; ///< last position and size
static wxPoint s_LastPos;
/**
* Function writeReport
* 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/
//
// PLEASE DO "NOT" EDIT THIS FILE!
......@@ -28,36 +28,37 @@ DIALOG_DRC_CONTROL_BASE::DIALOG_DRC_CONTROL_BASE( wxWindow* parent, wxWindowID i
bSizer7 = new wxBoxSizer( wxVERTICAL );
wxFlexGridSizer* fgMinValuesSizer;
fgMinValuesSizer = new wxFlexGridSizer( 2, 4, 0, 0 );
fgMinValuesSizer->SetFlexibleDirection( wxBOTH );
fgMinValuesSizer = new wxFlexGridSizer( 4, 2, 0, 0 );
fgMinValuesSizer->AddGrowableCol( 1 );
fgMinValuesSizer->SetFlexibleDirection( wxHORIZONTAL );
fgMinValuesSizer->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
m_ClearanceTitle = new wxStaticText( this, wxID_ANY, _("Clearance"), wxDefaultPosition, wxDefaultSize, 0 );
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 );
fgMinValuesSizer->Add( m_SetClearance, 0, wxALL|wxALIGN_CENTER_VERTICAL, 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 );
fgMinValuesSizer->Add( m_SetClearance, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 5 );
m_TrackMinWidthTitle = new wxStaticText( this, wxID_ANY, _("Track Min Width"), wxDefaultPosition, wxDefaultSize, 0 );
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->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->Wrap( -1 );
......@@ -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->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 );
......@@ -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 );
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 );
m_CommandSizer->Add( sbSizerOptions, 0, 0, 5 );
m_CommandSizer->Add( sbSizerOptions, 1, 0, 5 );
wxBoxSizer* bSizerMessages;
bSizerMessages = new wxBoxSizer( wxVERTICAL );
......@@ -102,8 +103,6 @@ DIALOG_DRC_CONTROL_BASE::DIALOG_DRC_CONTROL_BASE( wxWindow* parent, wxWindowID i
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->SetMinSize( wxSize( 160,-1 ) );
bSizerMessages->Add( m_Messages, 1, wxBOTTOM|wxRIGHT|wxLEFT|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
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->SetMinSize( wxSize( 450,300 ) );
bSizeClearanceBox->Add( m_ClearanceListBox, 1, wxALL|wxEXPAND, 5 );
......@@ -181,6 +179,7 @@ DIALOG_DRC_CONTROL_BASE::DIALOG_DRC_CONTROL_BASE( wxWindow* parent, wxWindowID i
this->SetSizer( m_MainSizer );
this->Layout();
m_MainSizer->Fit( this );
// Connect Events
m_CreateRptCtrl->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_DRC_CONTROL_BASE::OnReportCheckBoxClicked ), NULL, this );
......
......@@ -32,7 +32,7 @@
<property name="minimum_size"></property>
<property name="name">DIALOG_DRC_CONTROL_BASE</property>
<property name="pos"></property>
<property name="size">800,508</property>
<property name="size">-1,-1</property>
<property name="style">wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</property>
<property name="subclass"></property>
<property name="title">DRC Control</property>
......@@ -87,7 +87,7 @@
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag"></property>
<property name="proportion">0</property>
<property name="proportion">1</property>
<object class="wxStaticBoxSizer" expanded="1">
<property name="id">wxID_ANY</property>
<property name="label">Options</property>
......@@ -110,20 +110,20 @@
<property name="flag">wxEXPAND</property>
<property name="proportion">1</property>
<object class="wxFlexGridSizer" expanded="1">
<property name="cols">4</property>
<property name="flexible_direction">wxBOTH</property>
<property name="growablecols"></property>
<property name="cols">2</property>
<property name="flexible_direction">wxHORIZONTAL</property>
<property name="growablecols">1</property>
<property name="growablerows"></property>
<property name="hgap">0</property>
<property name="minimum_size"></property>
<property name="name">fgMinValuesSizer</property>
<property name="non_flexible_grow_mode">wxFLEX_GROWMODE_SPECIFIED</property>
<property name="permission">none</property>
<property name="rows">2</property>
<property name="rows">4</property>
<property name="vgap">0</property>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT|wxALIGN_RIGHT</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL</property>
<property name="proportion">0</property>
<object class="wxStaticText" expanded="1">
<property name="bg"></property>
......@@ -174,7 +174,7 @@
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxTextCtrl" expanded="1">
<property name="bg"></property>
......@@ -194,7 +194,7 @@
<property name="style"></property>
<property name="subclass"></property>
<property name="tooltip"></property>
<property name="value"></property>
<property name="value">By Netclass</property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
......@@ -229,7 +229,7 @@
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT|wxALIGN_RIGHT</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL</property>
<property name="proportion">0</property>
<object class="wxStaticText" expanded="1">
<property name="bg"></property>
......@@ -239,10 +239,10 @@
<property name="font"></property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Via Min Size</property>
<property name="label">Track Min Width</property>
<property name="maximum_size"></property>
<property name="minimum_size"></property>
<property name="name">m_ViaMinTitle</property>
<property name="name">m_TrackMinWidthTitle</property>
<property name="permission">protected</property>
<property name="pos"></property>
<property name="size"></property>
......@@ -280,7 +280,7 @@
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</property>
<property name="flag">wxALL|wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxTextCtrl" expanded="1">
<property name="bg"></property>
......@@ -293,7 +293,7 @@
<property name="maximum_size"></property>
<property name="maxlength">0</property>
<property name="minimum_size"></property>
<property name="name">m_SetViaMinSizeCtrl</property>
<property name="name">m_SetTrackMinWidthCtrl</property>
<property name="permission">public</property>
<property name="pos"></property>
<property name="size"></property>
......@@ -335,7 +335,7 @@
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALIGN_RIGHT|wxTOP|wxBOTTOM|wxLEFT</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL</property>
<property name="proportion">0</property>
<object class="wxStaticText" expanded="1">
<property name="bg"></property>
......@@ -345,10 +345,10 @@
<property name="font"></property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Track Min Width</property>
<property name="label">Via Min Size</property>
<property name="maximum_size"></property>
<property name="minimum_size"></property>
<property name="name">m_TrackMinWidthTitle</property>
<property name="name">m_ViaMinTitle</property>
<property name="permission">protected</property>
<property name="pos"></property>
<property name="size"></property>
......@@ -386,7 +386,7 @@
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxTextCtrl" expanded="1">
<property name="bg"></property>
......@@ -399,7 +399,7 @@
<property name="maximum_size"></property>
<property name="maxlength">0</property>
<property name="minimum_size"></property>
<property name="name">m_SetTrackMinWidthCtrl</property>
<property name="name">m_SetViaMinSizeCtrl</property>
<property name="permission">public</property>
<property name="pos"></property>
<property name="size"></property>
......@@ -492,7 +492,7 @@
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL</property>
<property name="flag">wxALL|wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxTextCtrl" expanded="1">
<property name="bg"></property>
......@@ -550,7 +550,7 @@
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxEXPAND|wxTOP|wxBOTTOM|wxRIGHT</property>
<property name="proportion">1</property>
<property name="proportion">0</property>
<object class="wxStaticBoxSizer" expanded="1">
<property name="id">wxID_ANY</property>
<property name="label">Create Report File</property>
......@@ -798,7 +798,7 @@
<property name="id">wxID_ANY</property>
<property name="maximum_size"></property>
<property name="maxlength">0</property>
<property name="minimum_size">160,-1</property>
<property name="minimum_size">-1,-1</property>
<property name="name">m_Messages</property>
<property name="permission">protected</property>
<property name="pos"></property>
......@@ -1228,7 +1228,7 @@
<property name="hidden">0</property>
<property name="id">ID_CLEARANCE_LIST</property>
<property name="maximum_size"></property>
<property name="minimum_size">450,300</property>
<property name="minimum_size">-1,-1</property>
<property name="name">m_ClearanceListBox</property>
<property name="permission">public</property>
<property name="pos"></property>
......
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Apr 16 2008)
// C++ code generated with wxFormBuilder (version Dec 29 2008)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
......@@ -51,8 +51,8 @@ class DIALOG_DRC_CONTROL_BASE : public wxDialog
protected:
wxStaticText* m_ClearanceTitle;
wxStaticText* m_ViaMinTitle;
wxStaticText* m_TrackMinWidthTitle;
wxStaticText* m_ViaMinTitle;
wxStaticText* m_MicroViaMinTitle;
wxButton* m_BrowseButton;
wxStaticText* m_staticText6;
......@@ -86,14 +86,14 @@ class DIALOG_DRC_CONTROL_BASE : public wxDialog
public:
wxTextCtrl* m_SetClearance;
wxTextCtrl* m_SetViaMinSizeCtrl;
wxTextCtrl* m_SetTrackMinWidthCtrl;
wxTextCtrl* m_SetViaMinSizeCtrl;
wxTextCtrl* m_SetMicroViakMinSizeCtrl;
wxCheckBox* m_CreateRptCtrl;
wxTextCtrl* m_RptFilenameCtrl;
DRCLISTBOX* m_ClearanceListBox;
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();
};
......
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