DIALOG_SHIM: fix not working initial size when creating a dialog.
The first time a DIALOG_SHIM was created, with a given size, this size was not taken in account. This this is now forced. (when recreated during a session, this is the last dialog size that is used)
This commit is contained in:
parent
b21840752d
commit
1aadf45947
|
@ -87,6 +87,7 @@ DIALOG_SHIM::DIALOG_SHIM( wxWindow* aParent, wxWindowID id, const wxString& titl
|
|||
m_parentFrame( nullptr )
|
||||
{
|
||||
KIWAY_HOLDER* kiwayHolder = nullptr;
|
||||
m_initialSize = size;
|
||||
|
||||
if( aParent )
|
||||
{
|
||||
|
@ -255,6 +256,8 @@ bool DIALOG_SHIM::Show( bool show )
|
|||
0 );
|
||||
}
|
||||
}
|
||||
else if( m_initialSize != wxDefaultSize )
|
||||
SetSize( m_initialSize );
|
||||
|
||||
// Be sure that the dialog appears in a visible area
|
||||
// (the dialog position might have been stored at the time when it was
|
||||
|
|
|
@ -210,14 +210,11 @@ int EE_INSPECTION_TOOL::CheckSymbol( const TOOL_EVENT& aEvent )
|
|||
LIB_PINS pinList;
|
||||
symbol->GetPins( pinList );
|
||||
|
||||
// Test for duplicates:
|
||||
// Sort pins by pin num, so 2 duplicate pins
|
||||
// (pins with the same number) will be consecutive in list
|
||||
sort( pinList.begin(), pinList.end(), sort_by_pin_number );
|
||||
|
||||
// Test for duplicates:
|
||||
DIALOG_DISPLAY_HTML_TEXT_BASE error_display( m_frame, wxID_ANY, _( "Symbol Warnings" ),
|
||||
wxDefaultPosition, wxSize( 750, 600 ) );
|
||||
|
||||
// The minimal grid size allowed to place a pin is 25 mils
|
||||
// the best grid size is 50 mils, but 25 mils is still usable
|
||||
// this is because all symbols are using a 50 mils grid to place pins, and therefore
|
||||
|
@ -451,6 +448,9 @@ int EE_INSPECTION_TOOL::CheckSymbol( const TOOL_EVENT& aEvent )
|
|||
|
||||
outmsg += "</body></html>";
|
||||
|
||||
DIALOG_DISPLAY_HTML_TEXT_BASE error_display( m_frame, wxID_ANY, _( "Symbol Warnings" ),
|
||||
wxDefaultPosition, wxSize( 700, 350 ) );
|
||||
|
||||
error_display.m_htmlWindow->SetPage( outmsg );
|
||||
error_display.ShowModal();
|
||||
}
|
||||
|
|
|
@ -216,6 +216,9 @@ protected:
|
|||
EDA_BASE_FRAME* m_parentFrame;
|
||||
|
||||
std::vector<wxWindow*> m_tabOrder;
|
||||
|
||||
// The size asked by the caller, used the first time the dialog is created
|
||||
wxSize m_initialSize;
|
||||
};
|
||||
|
||||
#endif // DIALOG_SHIM_
|
||||
|
|
Loading…
Reference in New Issue