Eeschema: incorrect dialog size fixes and OSX copy text fix.

This commit is contained in:
Jean-Pierre Charras 2016-07-18 09:59:50 -04:00 committed by Wayne Stambaugh
parent 26c5485be9
commit a65b7963d1
24 changed files with 115 additions and 58 deletions

View File

@ -218,8 +218,10 @@ DIALOG_BOM::DIALOG_BOM( SCH_EDIT_FRAME* parent ) :
m_config = Kiface().KifaceSettings();
installPluginsList();
GetSizer()->Fit( this );
Centre();
FixOSXCancelButtonIssue();
// Now all widgets have the size fixed, call FinishDialogSettings
FinishDialogSettings();
}
DIALOG_BOM::~DIALOG_BOM()

View File

@ -49,8 +49,10 @@ DIALOG_EDIT_COMPONENT_IN_LIBRARY::DIALOG_EDIT_COMPONENT_IN_LIBRARY( LIB_EDIT_FRA
initDlg();
GetSizer()->SetSizeHints( this );
Center();
FixOSXCancelButtonIssue();
// Now all widgets have the size fixed, call FinishDialogSettings
FinishDialogSettings();
}

View File

@ -126,6 +126,13 @@ private:
void showButtonHandler( wxCommandEvent& event );
void OnTestChipName( wxCommandEvent& event );
void OnSelectChipName( wxCommandEvent& event );
void OnInitDlg( wxInitDialogEvent& event )
{
TransferDataToWindow();
// Now all widgets have the size fixed, call FinishDialogSettings
FinishDialogSettings();
}
SCH_FIELD* findField( const wxString& aFieldName );
@ -198,11 +205,11 @@ DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::DIALOG_EDIT_COMPONENT_IN_SCHEMATIC( wxWindow
m_staticTextUnitPosY->SetLabel( GetAbbreviatedUnitsLabel( g_UserUnit ) );
wxToolTip::Enable( true );
GetSizer()->SetSizeHints( this );
Center();
stdDialogButtonSizerOK->SetDefault();
FixOSXCancelButtonIssue();
Fit();
}

View File

@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Jun 17 2015)
// C++ code generated with wxFormBuilder (version May 21 2016)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
@ -290,6 +290,7 @@ DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP(
// Connect Events
this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::OnCloseDialog ) );
this->Connect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::OnInitDlg ) );
m_buttonTestChipName->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::OnTestChipName ), NULL, this );
m_buttonSelectChipName->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::OnSelectChipName ), NULL, this );
defaultsButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::SetInitCmp ), NULL, this );
@ -307,6 +308,7 @@ DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::~DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP(
{
// Disconnect Events
this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::OnCloseDialog ) );
this->Disconnect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::OnInitDlg ) );
m_buttonTestChipName->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::OnTestChipName ), NULL, this );
m_buttonSelectChipName->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::OnSelectChipName ), NULL, this );
defaultsButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::SetInitCmp ), NULL, this );

View File

@ -67,7 +67,7 @@
<event name="OnHibernate"></event>
<event name="OnIconize"></event>
<event name="OnIdle"></event>
<event name="OnInitDialog"></event>
<event name="OnInitDialog">OnInitDlg</event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
@ -112,6 +112,7 @@
<property name="minimum_size"></property>
<property name="name">optionsSizer</property>
<property name="orient">wxVERTICAL</property>
<property name="parent">1</property>
<property name="permission">none</property>
<event name="OnUpdateUI"></event>
<object class="sizeritem" expanded="0">
@ -740,6 +741,7 @@
<property name="minimum_size"></property>
<property name="name">sbSizerChipName</property>
<property name="orient">wxVERTICAL</property>
<property name="parent">1</property>
<property name="permission">none</property>
<event name="OnUpdateUI"></event>
<object class="sizeritem" expanded="0">
@ -777,7 +779,7 @@
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="maxlength"></property>
<property name="maxlength">0</property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
@ -1140,7 +1142,7 @@
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="maxlength"></property>
<property name="maxlength">0</property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
@ -1377,6 +1379,7 @@
<property name="minimum_size"></property>
<property name="name">fieldsSizer</property>
<property name="orient">wxHORIZONTAL</property>
<property name="parent">1</property>
<property name="permission">none</property>
<event name="OnUpdateUI"></event>
<object class="sizeritem" expanded="1">
@ -1389,6 +1392,7 @@
<property name="minimum_size"></property>
<property name="name">gridStaticBoxSizer</property>
<property name="orient">wxVERTICAL</property>
<property name="parent">1</property>
<property name="permission">none</property>
<event name="OnUpdateUI"></event>
<object class="sizeritem" expanded="0">
@ -1981,6 +1985,7 @@
<property name="minimum_size"></property>
<property name="name">visibilitySizer</property>
<property name="orient">wxVERTICAL</property>
<property name="parent">1</property>
<property name="permission">none</property>
<event name="OnUpdateUI"></event>
<object class="sizeritem" expanded="0">
@ -2380,7 +2385,7 @@
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="maxlength"></property>
<property name="maxlength">0</property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
@ -2554,7 +2559,7 @@
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="maxlength"></property>
<property name="maxlength">0</property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
@ -2834,7 +2839,7 @@
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="maxlength"></property>
<property name="maxlength">0</property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
@ -3091,7 +3096,7 @@
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="maxlength"></property>
<property name="maxlength">0</property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
@ -3348,7 +3353,7 @@
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="maxlength"></property>
<property name="maxlength">0</property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>

View File

@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Jun 17 2015)
// C++ code generated with wxFormBuilder (version May 21 2016)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
@ -85,6 +85,7 @@ class DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP : public DIALOG_SHIM
// Virtual event handlers, overide them in your derived class
virtual void OnCloseDialog( wxCloseEvent& event ) { event.Skip(); }
virtual void OnInitDlg( wxInitDialogEvent& event ) { event.Skip(); }
virtual void OnTestChipName( wxCommandEvent& event ) { event.Skip(); }
virtual void OnSelectChipName( wxCommandEvent& event ) { event.Skip(); }
virtual void SetInitCmp( wxCommandEvent& event ) { event.Skip(); }

View File

@ -110,12 +110,10 @@ DIALOG_LABEL_EDITOR::DIALOG_LABEL_EDITOR( SCH_EDIT_FRAME* aParent, SCH_TEXT* aTe
m_CurrentText = aTextItem;
InitDialog();
GetSizer()->SetSizeHints( this );
Layout();
Fit();
SetMinSize( GetBestSize() );
FixOSXCancelButtonIssue();
Centre();
// Now all widgets have the size fixed, call FinishDialogSettings
FinishDialogSettings();
}

View File

@ -171,9 +171,6 @@ DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB::DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB(
m_parent = aParent;
m_libEntry = aLibEntry;
m_skipCopyFromPanel = false;
GetSizer()->SetSizeHints( this );
Centre();
}
@ -198,6 +195,11 @@ void DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB::OnInitDialog( wxInitDialogEvent& event
copySelectedFieldToPanel();
stdDialogButtonSizerOK->SetDefault();
FixOSXCancelButtonIssue();
// Now all widgets have the size fixed, call FinishDialogSettings
FinishDialogSettings();
}

View File

@ -138,8 +138,11 @@ void DIALOG_EDIT_ONE_FIELD::init()
}
m_sdbSizerButtonsOK->SetDefault();
GetSizer()->SetSizeHints( this );
Centre();
FixOSXCancelButtonIssue();
// Now all widgets have the size fixed, call FinishDialogSettings
FinishDialogSettings();
}

View File

@ -39,9 +39,6 @@ DIALOG_EESCHEMA_OPTIONS::DIALOG_EESCHEMA_OPTIONS( wxWindow* parent ) :
m_choiceUnits->SetFocus();
m_sdbSizerOK->SetDefault();
// Dialog should not shrink beyond it's minimal size.
GetSizer()->SetSizeHints( this );
wxListItem col0;
col0.SetId( 0 );
col0.SetText( _( "Field Name" ) );
@ -76,6 +73,11 @@ DIALOG_EESCHEMA_OPTIONS::DIALOG_EESCHEMA_OPTIONS( wxWindow* parent ) :
fieldDefaultValueTextCtrl->Connect( wxEVT_KILL_FOCUS,
wxFocusEventHandler( DIALOG_EESCHEMA_OPTIONS::OnEditControlKillFocus ), NULL, this );
FixOSXCancelButtonIssue();
// Now all widgets have the size fixed, call FinishDialogSettings
FinishDialogSettings();
}

View File

@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Jun 17 2015)
// C++ code generated with wxFormBuilder (version May 21 2016)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
@ -229,7 +229,7 @@ DIALOG_EESCHEMA_OPTIONS_BASE::DIALOG_EESCHEMA_OPTIONS_BASE( wxWindow* parent, wx
m_panel1->SetSizer( p1mainSizer );
m_panel1->Layout();
p1mainSizer->Fit( m_panel1 );
m_notebook->AddPage( m_panel1, _("General Options"), false );
m_notebook->AddPage( m_panel1, _("General Options"), true );
m_panel2 = new wxPanel( m_notebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
m_panel2->SetToolTip( _("User defined field names for schematic components. ") );
@ -274,7 +274,7 @@ DIALOG_EESCHEMA_OPTIONS_BASE::DIALOG_EESCHEMA_OPTIONS_BASE( wxWindow* parent, wx
m_panel2->SetSizer( bSizer6 );
m_panel2->Layout();
bSizer6->Fit( m_panel2 );
m_notebook->AddPage( m_panel2, _("Template Field Names"), true );
m_notebook->AddPage( m_panel2, _("Template Field Names"), false );
bOptionsSizer->Add( m_notebook, 1, wxALL|wxEXPAND, 5 );

View File

@ -45,7 +45,7 @@
<property name="name">DIALOG_EESCHEMA_OPTIONS_BASE</property>
<property name="pos"></property>
<property name="size">-1,-1</property>
<property name="style">wxDEFAULT_DIALOG_STYLE</property>
<property name="style">wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</property>
<property name="subclass">DIALOG_SHIM; dialog_shim.h</property>
<property name="title">Schematic Editor Options</property>
<property name="tooltip"></property>
@ -187,7 +187,7 @@
<object class="notebookpage" expanded="1">
<property name="bitmap"></property>
<property name="label">General Options</property>
<property name="select">0</property>
<property name="select">1</property>
<object class="wxPanel" expanded="1">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
@ -3761,7 +3761,7 @@
<object class="notebookpage" expanded="1">
<property name="bitmap"></property>
<property name="label">Template Field Names</property>
<property name="select">1</property>
<property name="select">0</property>
<object class="wxPanel" expanded="1">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
@ -3956,6 +3956,7 @@
<property name="minimum_size"></property>
<property name="name">fieldSizer</property>
<property name="orient">wxVERTICAL</property>
<property name="parent">1</property>
<property name="permission">none</property>
<event name="OnUpdateUI"></event>
<object class="sizeritem" expanded="1">
@ -4076,7 +4077,7 @@
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="maxlength"></property>
<property name="maxlength">0</property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
@ -4250,7 +4251,7 @@
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="maxlength"></property>
<property name="maxlength">0</property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>

View File

@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Jun 17 2015)
// C++ code generated with wxFormBuilder (version May 21 2016)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
@ -137,7 +137,7 @@ class DIALOG_EESCHEMA_OPTIONS_BASE : public DIALOG_SHIM
public:
DIALOG_EESCHEMA_OPTIONS_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Schematic Editor Options"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE );
DIALOG_EESCHEMA_OPTIONS_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Schematic Editor Options"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
~DIALOG_EESCHEMA_OPTIONS_BASE();
};

View File

@ -66,8 +66,10 @@ DIALOG_ERC::DIALOG_ERC( SCH_EDIT_FRAME* parent ) :
m_lastMarkerFound = NULL;
Init();
GetSizer()->SetSizeHints( this );
Centre();
FixOSXCancelButtonIssue();
// Now all widgets have the size fixed, call FinishDialogSettings
FinishDialogSettings();
}
DIALOG_ERC::~DIALOG_ERC()

View File

@ -37,6 +37,11 @@ DIALOG_LIB_EDIT_DRAW_ITEM::DIALOG_LIB_EDIT_DRAW_ITEM( wxWindow* parent,
// Required under wxGTK if we want to dismiss the dialog with the ESC key
SetFocus();
m_sdbSizer1OK->SetDefault();
FixOSXCancelButtonIssue();
// Now all widgets have the size fixed, call FinishDialogSettings
FinishDialogSettings();
}

View File

@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Oct 8 2012)
// C++ code generated with wxFormBuilder (version May 21 2016)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
@ -9,7 +9,7 @@
///////////////////////////////////////////////////////////////////////////
DIALOG_LIB_EDIT_DRAW_ITEM_BASE::DIALOG_LIB_EDIT_DRAW_ITEM_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
DIALOG_LIB_EDIT_DRAW_ITEM_BASE::DIALOG_LIB_EDIT_DRAW_ITEM_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 );
@ -21,7 +21,7 @@ DIALOG_LIB_EDIT_DRAW_ITEM_BASE::DIALOG_LIB_EDIT_DRAW_ITEM_BASE( wxWindow* parent
m_staticText1 = new wxStaticText( this, wxID_ANY, _("General"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText1->Wrap( -1 );
m_staticText1->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) );
m_staticText1->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
dlgBorderSizer->Add( m_staticText1, 0, wxALIGN_LEFT, 3 );
@ -39,7 +39,6 @@ DIALOG_LIB_EDIT_DRAW_ITEM_BASE::DIALOG_LIB_EDIT_DRAW_ITEM_BASE( wxWindow* parent
bSizer3->Add( 0, 0, 1, wxEXPAND, 3 );
m_textWidth = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_textWidth->SetMaxLength( 0 );
bSizer3->Add( m_textWidth, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3 );
m_staticWidthUnits = new wxStaticText( this, wxID_ANY, _("mm"), wxDefaultPosition, wxDefaultSize, 0 );
@ -51,7 +50,7 @@ DIALOG_LIB_EDIT_DRAW_ITEM_BASE::DIALOG_LIB_EDIT_DRAW_ITEM_BASE( wxWindow* parent
m_staticTextSharing = new wxStaticText( this, ID_M_STATICTEXTSHARING, _("Sharing"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextSharing->Wrap( -1 );
m_staticTextSharing->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) );
m_staticTextSharing->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
dlgBorderSizer->Add( m_staticTextSharing, 0, wxTOP|wxBOTTOM, 5 );
@ -84,7 +83,7 @@ DIALOG_LIB_EDIT_DRAW_ITEM_BASE::DIALOG_LIB_EDIT_DRAW_ITEM_BASE( wxWindow* parent
m_staticText4 = new wxStaticText( this, wxID_ANY, _("Fill Style"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText4->Wrap( -1 );
m_staticText4->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) );
m_staticText4->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
dlgBorderSizer->Add( m_staticText4, 0, wxALIGN_LEFT|wxBOTTOM, 3 );

View File

@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Oct 8 2012)
// C++ code generated with wxFormBuilder (version May 21 2016)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
@ -11,6 +11,9 @@
#include <wx/artprov.h>
#include <wx/xrc/xmlres.h>
#include <wx/intl.h>
class DIALOG_SHIM;
#include "dialog_shim.h"
#include <wx/string.h>
#include <wx/stattext.h>
#include <wx/gdicmn.h>
@ -29,7 +32,7 @@
///////////////////////////////////////////////////////////////////////////////
/// Class DIALOG_LIB_EDIT_DRAW_ITEM_BASE
///////////////////////////////////////////////////////////////////////////////
class DIALOG_LIB_EDIT_DRAW_ITEM_BASE : public wxDialog
class DIALOG_LIB_EDIT_DRAW_ITEM_BASE : public DIALOG_SHIM
{
private:

View File

@ -67,6 +67,11 @@ DIALOG_LIB_EDIT_PIN::~DIALOG_LIB_EDIT_PIN()
void DIALOG_LIB_EDIT_PIN::OnInitDialog( wxInitDialogEvent& event )
{
m_textPinName->SetFocus();
FixOSXCancelButtonIssue();
// Now all widgets have the size fixed, call FinishDialogSettings
FinishDialogSettings();
}
/*

View File

@ -48,8 +48,10 @@ DIALOG_LIB_EDIT_TEXT::DIALOG_LIB_EDIT_TEXT( LIB_EDIT_FRAME* aParent, LIB_TEXT* a
m_graphicText = aText;
initDlg();
GetSizer()->SetSizeHints(this);
Centre();
FixOSXCancelButtonIssue();
// Now all widgets have the size fixed, call FinishDialogSettings
FinishDialogSettings();
}

View File

@ -32,4 +32,9 @@ DIALOG_LIB_NEW_COMPONENT::DIALOG_LIB_NEW_COMPONENT( wxWindow* parent ) :
// What happens when user presses "Enter"? OK button! OK?
m_sdbSizerOK->SetDefault();
FixOSXCancelButtonIssue();
// Now all widgets have the size fixed, call FinishDialogSettings
FinishDialogSettings();
}

View File

@ -343,9 +343,11 @@ NETLIST_DIALOG::NETLIST_DIALOG( SCH_EDIT_FRAME* parent ) :
InstallCustomPages();
SetDefaultItem( m_buttonNetlist );
GetSizer()->SetSizeHints( this );
Centre();
FixOSXCancelButtonIssue();
// Now all widgets have the size fixed, call FinishDialogSettings
FinishDialogSettings();
}

View File

@ -75,9 +75,10 @@ DIALOG_PLOT_SCHEMATIC::DIALOG_PLOT_SCHEMATIC( SCH_EDIT_FRAME* parent ) :
initDlg();
GetSizer()->SetSizeHints( this );
FixOSXCancelButtonIssue();
Centre();
// Now all widgets have the size fixed, call FinishDialogSettings
FinishDialogSettings();
}

View File

@ -48,6 +48,11 @@ DIALOG_SCH_EDIT_SHEET_PIN::DIALOG_SCH_EDIT_SHEET_PIN( wxWindow* parent ) :
m_textName->SetFocus();
m_sdbSizerOK->SetDefault();
FixOSXCancelButtonIssue();
// Now all widgets have the size fixed, call FinishDialogSettings
FinishDialogSettings();
// On some windows manager (Unity, XFCE), this dialog is
// not always raised, depending on this dialog is run.
// Force it to be raised

View File

@ -34,7 +34,10 @@ DIALOG_SCH_SHEET_PROPS::DIALOG_SCH_SHEET_PROPS( wxWindow* parent ) :
m_textFileName->SetFocus();
m_sdbSizer1OK->SetDefault();
GetSizer()->Fit( this );
FixOSXCancelButtonIssue();
// Now all widgets have the size fixed, call FinishDialogSettings
FinishDialogSettings();
}