Fix some issues with Eeschema's Shape Properties dialog.
Fixes https://gitlab.com/kicad/code/kicad/issues/10140
This commit is contained in:
parent
27d8df1122
commit
32dec0127e
|
@ -11,10 +11,6 @@
|
|||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
BEGIN_EVENT_TABLE( DIALOG_SHAPE_PROPERTIES_BASE, DIALOG_SHIM )
|
||||
EVT_BUTTON( wxID_APPLY, DIALOG_SHAPE_PROPERTIES_BASE::_wxFB_resetDefaults )
|
||||
END_EVENT_TABLE()
|
||||
|
||||
DIALOG_SHAPE_PROPERTIES_BASE::DIALOG_SHAPE_PROPERTIES_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style )
|
||||
{
|
||||
this->SetSizeHints( wxDefaultSize, wxDefaultSize );
|
||||
|
@ -56,7 +52,7 @@ DIALOG_SHAPE_PROPERTIES_BASE::DIALOG_SHAPE_PROPERTIES_BASE( wxWindow* parent, wx
|
|||
m_panel1->SetSizer( bSizer2 );
|
||||
m_panel1->Layout();
|
||||
bSizer2->Fit( m_panel1 );
|
||||
fgSizerGeneral->Add( m_panel1, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 2 );
|
||||
fgSizerGeneral->Add( m_panel1, 0, wxALIGN_CENTER_VERTICAL, 2 );
|
||||
|
||||
|
||||
fgSizerGeneral->Add( 0, 0, 1, wxEXPAND, 5 );
|
||||
|
@ -106,7 +102,7 @@ DIALOG_SHAPE_PROPERTIES_BASE::DIALOG_SHAPE_PROPERTIES_BASE( wxWindow* parent, wx
|
|||
m_panel11->SetSizer( bSizer21 );
|
||||
m_panel11->Layout();
|
||||
bSizer21->Fit( m_panel11 );
|
||||
fgSizerGeneral->Add( m_panel11, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
|
||||
fgSizerGeneral->Add( m_panel11, 0, wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
|
||||
mainSizer->Add( fgSizerGeneral, 1, wxEXPAND|wxTOP|wxBOTTOM|wxLEFT, 10 );
|
||||
|
@ -125,8 +121,6 @@ DIALOG_SHAPE_PROPERTIES_BASE::DIALOG_SHAPE_PROPERTIES_BASE( wxWindow* parent, wx
|
|||
m_sdbSizer = new wxStdDialogButtonSizer();
|
||||
m_sdbSizerOK = new wxButton( this, wxID_OK );
|
||||
m_sdbSizer->AddButton( m_sdbSizerOK );
|
||||
m_sdbSizerApply = new wxButton( this, wxID_APPLY );
|
||||
m_sdbSizer->AddButton( m_sdbSizerApply );
|
||||
m_sdbSizerCancel = new wxButton( this, wxID_CANCEL );
|
||||
m_sdbSizer->AddButton( m_sdbSizerCancel );
|
||||
m_sdbSizer->Realize();
|
||||
|
|
|
@ -1079,7 +1079,7 @@
|
|||
<property name="flag">wxALL|wxALIGN_RIGHT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStdDialogButtonSizer" expanded="1">
|
||||
<property name="Apply">1</property>
|
||||
<property name="Apply">0</property>
|
||||
<property name="Cancel">1</property>
|
||||
<property name="ContextHelp">0</property>
|
||||
<property name="Help">0</property>
|
||||
|
@ -1090,7 +1090,6 @@
|
|||
<property name="minimum_size"></property>
|
||||
<property name="name">m_sdbSizer</property>
|
||||
<property name="permission">protected</property>
|
||||
<event name="OnApplyButtonClick">resetDefaults</event>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
|
|
|
@ -35,13 +35,8 @@ class COLOR_SWATCH;
|
|||
///////////////////////////////////////////////////////////////////////////////
|
||||
class DIALOG_SHAPE_PROPERTIES_BASE : public DIALOG_SHIM
|
||||
{
|
||||
DECLARE_EVENT_TABLE()
|
||||
private:
|
||||
|
||||
// Private event handlers
|
||||
void _wxFB_resetDefaults( wxCommandEvent& event ){ resetDefaults( event ); }
|
||||
|
||||
|
||||
protected:
|
||||
wxStaticText* m_lineWidthLabel;
|
||||
wxTextCtrl* m_lineWidthCtrl;
|
||||
|
@ -60,13 +55,8 @@ class DIALOG_SHAPE_PROPERTIES_BASE : public DIALOG_SHIM
|
|||
wxStaticLine* m_staticline;
|
||||
wxStdDialogButtonSizer* m_sdbSizer;
|
||||
wxButton* m_sdbSizerOK;
|
||||
wxButton* m_sdbSizerApply;
|
||||
wxButton* m_sdbSizerCancel;
|
||||
|
||||
// Virtual event handlers, overide them in your derived class
|
||||
virtual void resetDefaults( wxCommandEvent& event ) { event.Skip(); }
|
||||
|
||||
|
||||
public:
|
||||
|
||||
DIALOG_SHAPE_PROPERTIES_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("%s Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
|
||||
|
|
|
@ -255,6 +255,7 @@ bool SCH_EDIT_TOOL::Init()
|
|||
case SCH_HIER_LABEL_T:
|
||||
case SCH_NETCLASS_FLAG_T:
|
||||
case SCH_FIELD_T:
|
||||
case SCH_SHAPE_T:
|
||||
case SCH_BITMAP_T:
|
||||
return aSel.GetSize() == 1;
|
||||
|
||||
|
|
Loading…
Reference in New Issue