Edit pcbnew zone dialog layout.
This commit is contained in:
parent
d3932f5f25
commit
f52ed7833d
|
@ -29,10 +29,12 @@
|
|||
*/
|
||||
wxString dialog_copper_zone::m_netNameShowFilter( wxT( "*" ) );
|
||||
|
||||
/************************************************************************************************/
|
||||
wxPoint dialog_copper_zone::prevPosition( -1, -1 );
|
||||
wxSize dialog_copper_zone::prevSize;
|
||||
|
||||
|
||||
dialog_copper_zone::dialog_copper_zone( WinEDA_PcbFrame* parent, ZONE_SETTING* zone_setting ) :
|
||||
dialog_copper_zone_base( parent )
|
||||
/************************************************************************************************/
|
||||
{
|
||||
m_Parent = parent;
|
||||
m_Config = wxGetApp().m_EDA_Config;
|
||||
|
@ -58,6 +60,10 @@ dialog_copper_zone::dialog_copper_zone( WinEDA_PcbFrame* parent, ZONE_SETTING* z
|
|||
|
||||
GetSizer()->SetSizeHints( this );
|
||||
Center();
|
||||
|
||||
if( prevPosition.x != -1 )
|
||||
SetSize( prevPosition.x, prevPosition.y,
|
||||
prevSize.x, prevSize.y );
|
||||
}
|
||||
|
||||
|
||||
|
@ -127,7 +133,6 @@ void dialog_copper_zone::initDialog()
|
|||
|
||||
m_cornerSmoothingChoice->SetSelection( m_Zone_Setting->GetCornerSmoothingType() );
|
||||
|
||||
AddUnitSymbol( *m_cornerSmoothingTitle, g_UserUnit );
|
||||
PutValueInLocalUnits( *m_cornerSmoothingCtrl,
|
||||
m_Zone_Setting->GetCornerRadius(),
|
||||
PCB_INTERNAL_UNIT );
|
||||
|
@ -175,9 +180,6 @@ void dialog_copper_zone::initDialog()
|
|||
m_LayerSelectionCtrl->Select( itemIndex );
|
||||
}
|
||||
|
||||
// Set layer list column width to widget width
|
||||
m_LayerSelectionCtrl->SetColumnWidth( 0, m_LayerSelectionCtrl->GetSize().x );
|
||||
|
||||
wxString netNameDoNotShowFilter = wxT( "N-*" );
|
||||
if( m_Config )
|
||||
{
|
||||
|
@ -210,10 +212,21 @@ void dialog_copper_zone::OnButtonCancelClick( wxCommandEvent& event )
|
|||
|
||||
void dialog_copper_zone::OnClose( wxCloseEvent& event )
|
||||
{
|
||||
prevPosition = GetPosition();
|
||||
prevSize = GetSize();
|
||||
EndModal( m_OnExitCode );
|
||||
}
|
||||
|
||||
|
||||
void dialog_copper_zone::OnSize( wxSizeEvent& event )
|
||||
{
|
||||
Layout();
|
||||
|
||||
// Set layer list column width to widget width minus a few pixels
|
||||
m_LayerSelectionCtrl->SetColumnWidth( 0, m_LayerSelectionCtrl->GetSize().x - 5 );
|
||||
}
|
||||
|
||||
|
||||
void dialog_copper_zone::OnCornerSmoothingModeChoice( wxCommandEvent& event )
|
||||
{
|
||||
int selection = m_cornerSmoothingChoice->GetSelection();
|
||||
|
@ -418,6 +431,9 @@ void dialog_copper_zone::OnButtonOkClick( wxCommandEvent& event )
|
|||
/*****************************************************************/
|
||||
{
|
||||
m_netNameShowFilter = m_ShowNetNameFilter->GetValue();
|
||||
prevPosition = GetPosition();
|
||||
prevSize = GetSize();
|
||||
|
||||
if( AcceptOptions( true ) )
|
||||
EndModal( ZONE_OK );
|
||||
}
|
||||
|
@ -427,6 +443,9 @@ void dialog_copper_zone::OnButtonOkClick( wxCommandEvent& event )
|
|||
void dialog_copper_zone::ExportSetupToOtherCopperZones( wxCommandEvent& event )
|
||||
/******************************************************************************/
|
||||
{
|
||||
prevPosition = GetPosition();
|
||||
prevSize = GetSize();
|
||||
|
||||
if( !AcceptOptions( true, true ) )
|
||||
return;
|
||||
|
||||
|
|
|
@ -31,6 +31,9 @@ private:
|
|||
*/
|
||||
wxListView* m_LayerSelectionCtrl;
|
||||
|
||||
static wxPoint prevPosition; // Dialog position & size
|
||||
static wxSize prevSize;
|
||||
|
||||
public:
|
||||
dialog_copper_zone( WinEDA_PcbFrame* parent, ZONE_SETTING* zone_setting );
|
||||
private:
|
||||
|
@ -38,6 +41,7 @@ private:
|
|||
void OnButtonOkClick( wxCommandEvent& event );
|
||||
void OnButtonCancelClick( wxCommandEvent& event );
|
||||
void OnClose( wxCloseEvent& event );
|
||||
void OnSize( wxSizeEvent& event );
|
||||
void OnCornerSmoothingModeChoice( wxCommandEvent& event );
|
||||
bool AcceptOptions( bool aPromptForErrors, bool aUseExportableSetupOnly = false );
|
||||
void OnNetSortingOptionSelected( wxCommandEvent& event );
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
|
||||
BEGIN_EVENT_TABLE( dialog_copper_zone_base, wxDialog )
|
||||
EVT_CLOSE( dialog_copper_zone_base::_wxFB_OnClose )
|
||||
EVT_SIZE( dialog_copper_zone_base::_wxFB_OnSize )
|
||||
EVT_CHOICE( ID_M_NETDISPLAYOPTION, dialog_copper_zone_base::_wxFB_OnNetSortingOptionSelected )
|
||||
EVT_TEXT_ENTER( ID_TEXTCTRL_NETNAMES_FILTER, dialog_copper_zone_base::_wxFB_OnRunFiltersButtonClick )
|
||||
EVT_TEXT_ENTER( ID_TEXTCTRL_NETNAMES_FILTER, dialog_copper_zone_base::_wxFB_OnRunFiltersButtonClick )
|
||||
|
@ -37,7 +38,7 @@ dialog_copper_zone_base::dialog_copper_zone_base( wxWindow* parent, wxWindowID i
|
|||
m_staticText17->Wrap( -1 );
|
||||
m_layerSizer->Add( m_staticText17, 0, wxLEFT|wxRIGHT|wxTOP, 5 );
|
||||
|
||||
m_OptionsBoxSizer->Add( m_layerSizer, 0, wxEXPAND, 5 );
|
||||
m_OptionsBoxSizer->Add( m_layerSizer, 1, wxEXPAND, 5 );
|
||||
|
||||
wxBoxSizer* bSizer7;
|
||||
bSizer7 = new wxBoxSizer( wxVERTICAL );
|
||||
|
|
|
@ -106,7 +106,7 @@
|
|||
<event name="OnRightDown"></event>
|
||||
<event name="OnRightUp"></event>
|
||||
<event name="OnSetFocus"></event>
|
||||
<event name="OnSize"></event>
|
||||
<event name="OnSize">OnSize</event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
<object class="wxBoxSizer" expanded="1">
|
||||
<property name="minimum_size"></property>
|
||||
|
@ -125,7 +125,7 @@
|
|||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND</property>
|
||||
<property name="proportion">0</property>
|
||||
<property name="proportion">1</property>
|
||||
<object class="wxBoxSizer" expanded="1">
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">m_layerSizer</property>
|
||||
|
|
|
@ -36,6 +36,7 @@ class dialog_copper_zone_base : public wxDialog
|
|||
|
||||
// Private event handlers
|
||||
void _wxFB_OnClose( wxCloseEvent& event ){ OnClose( event ); }
|
||||
void _wxFB_OnSize( wxSizeEvent& event ){ OnSize( event ); }
|
||||
void _wxFB_OnNetSortingOptionSelected( wxCommandEvent& event ){ OnNetSortingOptionSelected( event ); }
|
||||
void _wxFB_OnRunFiltersButtonClick( wxCommandEvent& event ){ OnRunFiltersButtonClick( event ); }
|
||||
void _wxFB_OnCornerSmoothingModeChoice( wxCommandEvent& event ){ OnCornerSmoothingModeChoice( event ); }
|
||||
|
@ -103,6 +104,7 @@ class dialog_copper_zone_base : public wxDialog
|
|||
|
||||
// Virtual event handlers, overide them in your derived class
|
||||
virtual void OnClose( wxCloseEvent& event ) { event.Skip(); }
|
||||
virtual void OnSize( wxSizeEvent& event ) { event.Skip(); }
|
||||
virtual void OnNetSortingOptionSelected( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnRunFiltersButtonClick( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnCornerSmoothingModeChoice( wxCommandEvent& event ) { event.Skip(); }
|
||||
|
|
Loading…
Reference in New Issue