PAGED_DIALOG: allow setting initial size in ctor.
(cherry picked from commit f5da58e17d
)
This commit is contained in:
parent
cb6c91be06
commit
c61931996a
|
@ -1021,7 +1021,7 @@ void EDA_BASE_FRAME::ShowPreferences( wxString aStartPage, wxString aStartParent
|
||||||
{
|
{
|
||||||
wxBeginBusyCursor( wxHOURGLASS_CURSOR );
|
wxBeginBusyCursor( wxHOURGLASS_CURSOR );
|
||||||
|
|
||||||
PAGED_DIALOG dlg( this, _( "Preferences" ), true );
|
PAGED_DIALOG dlg( this, _( "Preferences" ), true, wxEmptyString, wxSize( 980, 560 ) );
|
||||||
|
|
||||||
dlg.SetEvtHandlerEnabled( false );
|
dlg.SetEvtHandlerEnabled( false );
|
||||||
|
|
||||||
|
@ -1182,10 +1182,6 @@ void EDA_BASE_FRAME::ShowPreferences( wxString aStartPage, wxString aStartParent
|
||||||
if( !aStartPage.IsEmpty() )
|
if( !aStartPage.IsEmpty() )
|
||||||
dlg.SetInitialPage( aStartPage, aStartParentPage );
|
dlg.SetInitialPage( aStartPage, aStartParentPage );
|
||||||
|
|
||||||
// This is unfortunate, but it's the cost of lazy-loading the panels
|
|
||||||
book->SetMinSize( wxSize( 980, 560 ) );
|
|
||||||
book->SetInitialSize( wxSize( 980, 560 ) );
|
|
||||||
|
|
||||||
dlg.SetEvtHandlerEnabled( true );
|
dlg.SetEvtHandlerEnabled( true );
|
||||||
wxEndBusyCursor();
|
wxEndBusyCursor();
|
||||||
|
|
||||||
|
|
|
@ -41,8 +41,8 @@ std::map<wxString, wxString> g_lastParentPage;
|
||||||
|
|
||||||
|
|
||||||
PAGED_DIALOG::PAGED_DIALOG( wxWindow* aParent, const wxString& aTitle, bool aShowReset,
|
PAGED_DIALOG::PAGED_DIALOG( wxWindow* aParent, const wxString& aTitle, bool aShowReset,
|
||||||
const wxString& aAuxiliaryAction ) :
|
const wxString& aAuxiliaryAction, const wxSize& aInitialSize ) :
|
||||||
DIALOG_SHIM( aParent, wxID_ANY, aTitle, wxDefaultPosition, wxDefaultSize,
|
DIALOG_SHIM( aParent, wxID_ANY, aTitle, wxDefaultPosition, aInitialSize,
|
||||||
wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER ),
|
wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER ),
|
||||||
m_auxiliaryButton( nullptr ),
|
m_auxiliaryButton( nullptr ),
|
||||||
m_resetButton( nullptr ),
|
m_resetButton( nullptr ),
|
||||||
|
|
|
@ -38,7 +38,7 @@
|
||||||
|
|
||||||
DIALOG_SCHEMATIC_SETUP::DIALOG_SCHEMATIC_SETUP( SCH_EDIT_FRAME* aFrame ) :
|
DIALOG_SCHEMATIC_SETUP::DIALOG_SCHEMATIC_SETUP( SCH_EDIT_FRAME* aFrame ) :
|
||||||
PAGED_DIALOG( aFrame, _( "Schematic Setup" ), true,
|
PAGED_DIALOG( aFrame, _( "Schematic Setup" ), true,
|
||||||
_( "Import Settings from Another Project..." ) ),
|
_( "Import Settings from Another Project..." ), wxSize( 920, 460 ) ),
|
||||||
m_frame( aFrame )
|
m_frame( aFrame )
|
||||||
{
|
{
|
||||||
SetEvtHandlerEnabled( false );
|
SetEvtHandlerEnabled( false );
|
||||||
|
@ -112,10 +112,6 @@ DIALOG_SCHEMATIC_SETUP::DIALOG_SCHEMATIC_SETUP( SCH_EDIT_FRAME* aFrame ) :
|
||||||
for( size_t i = 0; i < m_treebook->GetPageCount(); ++i )
|
for( size_t i = 0; i < m_treebook->GetPageCount(); ++i )
|
||||||
m_treebook->ExpandNode( i );
|
m_treebook->ExpandNode( i );
|
||||||
|
|
||||||
// This is unfortunate, but it's the cost of lazy-loading the panels
|
|
||||||
m_treebook->SetMinSize( wxSize( 920, 460 ) );
|
|
||||||
m_treebook->SetInitialSize( wxSize( 920, 460 ) );
|
|
||||||
|
|
||||||
SetEvtHandlerEnabled( true );
|
SetEvtHandlerEnabled( true );
|
||||||
|
|
||||||
finishDialogSettings();
|
finishDialogSettings();
|
||||||
|
|
|
@ -32,7 +32,8 @@ class PAGED_DIALOG : public DIALOG_SHIM
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
PAGED_DIALOG( wxWindow* aParent, const wxString& aTitle, bool aShowReset,
|
PAGED_DIALOG( wxWindow* aParent, const wxString& aTitle, bool aShowReset,
|
||||||
const wxString& aAuxiliaryAction = wxEmptyString );
|
const wxString& aAuxiliaryAction = wxEmptyString,
|
||||||
|
const wxSize& aInitialSize = wxDefaultSize );
|
||||||
~PAGED_DIALOG() override;
|
~PAGED_DIALOG() override;
|
||||||
|
|
||||||
WX_TREEBOOK* GetTreebook() { return m_treebook; }
|
WX_TREEBOOK* GetTreebook() { return m_treebook; }
|
||||||
|
|
|
@ -51,7 +51,7 @@ std::mutex DIALOG_BOARD_SETUP::g_Mutex;
|
||||||
|
|
||||||
DIALOG_BOARD_SETUP::DIALOG_BOARD_SETUP( PCB_EDIT_FRAME* aFrame ) :
|
DIALOG_BOARD_SETUP::DIALOG_BOARD_SETUP( PCB_EDIT_FRAME* aFrame ) :
|
||||||
PAGED_DIALOG( aFrame, _( "Board Setup" ), false,
|
PAGED_DIALOG( aFrame, _( "Board Setup" ), false,
|
||||||
_( "Import Settings from Another Board..." ) ),
|
_( "Import Settings from Another Board..." ), wxSize( 980, 600 ) ),
|
||||||
m_frame( aFrame ),
|
m_frame( aFrame ),
|
||||||
m_layers( nullptr ),
|
m_layers( nullptr ),
|
||||||
m_physicalStackup( nullptr ),
|
m_physicalStackup( nullptr ),
|
||||||
|
@ -178,10 +178,6 @@ DIALOG_BOARD_SETUP::DIALOG_BOARD_SETUP( PCB_EDIT_FRAME* aFrame ) :
|
||||||
for( size_t i = 0; i < m_treebook->GetPageCount(); ++i )
|
for( size_t i = 0; i < m_treebook->GetPageCount(); ++i )
|
||||||
m_treebook->ExpandNode( i );
|
m_treebook->ExpandNode( i );
|
||||||
|
|
||||||
// This is unfortunate, but it's the cost of lazy-loading the panels
|
|
||||||
m_treebook->SetMinSize( wxSize( 980, 600 ) );
|
|
||||||
m_treebook->SetInitialSize( wxSize( 980, 600 ) );
|
|
||||||
|
|
||||||
SetEvtHandlerEnabled( true );
|
SetEvtHandlerEnabled( true );
|
||||||
|
|
||||||
finishDialogSettings();
|
finishDialogSettings();
|
||||||
|
|
Loading…
Reference in New Issue