PANEL_STARTWIZARD_LIBRARIES: fix minimal size of panel.
Previously, a too small size was used, because a wxStaticText was not initialized when the panel best size was computed. It is now initialized in the CTOR, before sizes are computed, and is taken in account.
This commit is contained in:
@@ -39,6 +39,8 @@ public:
|
||||
{
|
||||
m_bmpWarning->SetBitmap( KiBitmapBundle( BITMAPS::dialog_warning ) );
|
||||
m_sizerWarning->Layout();
|
||||
|
||||
InitTableListMsg();
|
||||
}
|
||||
|
||||
bool TransferDataFromWindow() override
|
||||
@@ -86,13 +88,20 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
m_sizerWarning->Hide( !m_showWarning );
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void InitTableListMsg()
|
||||
{
|
||||
wxString missingTablesText;
|
||||
bool showWarning = false;
|
||||
m_showWarning = false;
|
||||
|
||||
for( const LIBRARY_TABLE_TYPE& type : m_model->missing_tables )
|
||||
{
|
||||
if( !LIBRARY_MANAGER::IsTableValid( LIBRARY_MANAGER::DefaultGlobalTablePath( type ) ) )
|
||||
showWarning = true;
|
||||
m_showWarning = true;
|
||||
|
||||
switch( type )
|
||||
{
|
||||
@@ -114,15 +123,12 @@ public:
|
||||
}
|
||||
|
||||
m_stRequiredTables->SetLabel( missingTablesText.BeforeLast( '\n' ) );
|
||||
|
||||
m_sizerWarning->Hide( !showWarning );
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
private:
|
||||
std::shared_ptr<STARTWIZARD_PROVIDER_LIBRARIES_MODEL> m_model;
|
||||
STARTWIZARD* m_wizard;
|
||||
bool m_showWarning;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -324,8 +324,9 @@ double ReadDouble( char*& text, bool aSkipSeparator = true )
|
||||
line.Trim( false );
|
||||
|
||||
// Warning: in locales using ',' as separator, wxString::ToCDouble accept both '.' and ','
|
||||
// as separator (wxWidgets bug?). So because ',' is used also to separe 2 operands in
|
||||
// Gerber strings, remove the first ',' that is a operand separator, not a float separator
|
||||
// as separator (wxWidgets 3.2.6 bug?, look fixed in 3.2.8). So because ',' is used also
|
||||
// to separe 2 operands in Gerber strings, remove the first ',' that is a operand separator,
|
||||
// not a float separator
|
||||
line.Replace(","," ", false);
|
||||
line.ToCDouble( &ret );
|
||||
// Find the end of the float number. The float number contains only chars
|
||||
|
||||
Reference in New Issue
Block a user