Cvpcb: remove fixed size and use the last stored size.
It fixes a bug created by commit b1eed74b55
.
Other very minor fix in Cvpcb
This commit is contained in:
parent
6588bef1b1
commit
62ef63501c
|
@ -270,10 +270,10 @@ void EDA_BASE_FRAME::LoadSettings( wxConfigBase* aCfg )
|
||||||
aCfg->Read( text, &m_FramePos.y );
|
aCfg->Read( text, &m_FramePos.y );
|
||||||
|
|
||||||
text = baseCfgName + entrySizeX;
|
text = baseCfgName + entrySizeX;
|
||||||
aCfg->Read( text, &m_FrameSize.x, 600 );
|
aCfg->Read( text, &m_FrameSize.x, wxDefaultSize.x );
|
||||||
|
|
||||||
text = baseCfgName + entrySizeY;
|
text = baseCfgName + entrySizeY;
|
||||||
aCfg->Read( text, &m_FrameSize.y, 400 );
|
aCfg->Read( text, &m_FrameSize.y, wxDefaultSize.x );
|
||||||
|
|
||||||
text = baseCfgName + entryMaximized;
|
text = baseCfgName + entryMaximized;
|
||||||
aCfg->Read( text, &maximized, 0 );
|
aCfg->Read( text, &maximized, 0 );
|
||||||
|
|
|
@ -32,11 +32,9 @@
|
||||||
#include <fp_lib_table.h>
|
#include <fp_lib_table.h>
|
||||||
#include <kiface_i.h>
|
#include <kiface_i.h>
|
||||||
#include <pgm_base.h>
|
#include <pgm_base.h>
|
||||||
//#include <wxstruct.h>
|
|
||||||
#include <confirm.h>
|
#include <confirm.h>
|
||||||
|
|
||||||
#include <cvpcb.h>
|
#include <cvpcb.h>
|
||||||
#include <zones.h>
|
|
||||||
#include <cvpcb_mainframe.h>
|
#include <cvpcb_mainframe.h>
|
||||||
#include <cvpcb_id.h>
|
#include <cvpcb_id.h>
|
||||||
|
|
||||||
|
|
|
@ -51,8 +51,8 @@
|
||||||
#include <cvpcb_id.h>
|
#include <cvpcb_id.h>
|
||||||
|
|
||||||
|
|
||||||
wxSize const FRAME_MIN_SIZE_DU( 300, 120 );
|
wxSize const FRAME_MIN_SIZE_DU( 350, 250 );
|
||||||
wxSize const FRAME_DEFAULT_SIZE_DU( 500, 250 );
|
wxSize const FRAME_DEFAULT_SIZE_DU( 450, 300 );
|
||||||
|
|
||||||
///@{
|
///@{
|
||||||
/// \ingroup config
|
/// \ingroup config
|
||||||
|
@ -136,11 +136,12 @@ CVPCB_MAINFRAME::CVPCB_MAINFRAME( KIWAY* aKiway, wxWindow* aParent ) :
|
||||||
LoadSettings( config() );
|
LoadSettings( config() );
|
||||||
|
|
||||||
wxSize const frame_min( ConvertDialogToPixels( FRAME_MIN_SIZE_DU ) );
|
wxSize const frame_min( ConvertDialogToPixels( FRAME_MIN_SIZE_DU ) );
|
||||||
wxSize const frame_default( ConvertDialogToPixels( FRAME_DEFAULT_SIZE_DU ) );
|
|
||||||
|
|
||||||
m_FrameSize = frame_default;
|
|
||||||
SetSizeHints( frame_min );
|
SetSizeHints( frame_min );
|
||||||
|
|
||||||
|
// Frame size and position
|
||||||
|
SetSize( m_FramePos.x, m_FramePos.y, m_FrameSize.x, m_FrameSize.y );
|
||||||
|
|
||||||
// create the status bar
|
// create the status bar
|
||||||
static const int dims[3] = { -1, -1, 250 };
|
static const int dims[3] = { -1, -1, 250 };
|
||||||
|
|
||||||
|
@ -184,9 +185,6 @@ CVPCB_MAINFRAME::CVPCB_MAINFRAME( KIWAY* aKiway, wxWindow* aParent ) :
|
||||||
wxAuiPaneInfo( info ).Name( wxT( "m_footprintListBox" ) ).
|
wxAuiPaneInfo( info ).Name( wxT( "m_footprintListBox" ) ).
|
||||||
Right().BestSize( (int) ( m_FrameSize.x * 0.30 ), m_FrameSize.y ) );
|
Right().BestSize( (int) ( m_FrameSize.x * 0.30 ), m_FrameSize.y ) );
|
||||||
|
|
||||||
// Frame size and position
|
|
||||||
SetSize( m_FramePos.x, m_FramePos.y, m_FrameSize.x, m_FrameSize.y );
|
|
||||||
|
|
||||||
m_auimgr.Update();
|
m_auimgr.Update();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -201,6 +199,11 @@ void CVPCB_MAINFRAME::LoadSettings( wxConfigBase* aCfg )
|
||||||
{
|
{
|
||||||
EDA_BASE_FRAME::LoadSettings( aCfg );
|
EDA_BASE_FRAME::LoadSettings( aCfg );
|
||||||
|
|
||||||
|
wxSize const frame_default( ConvertDialogToPixels( FRAME_DEFAULT_SIZE_DU ) );
|
||||||
|
|
||||||
|
if( m_FrameSize == wxDefaultSize )
|
||||||
|
m_FrameSize = frame_default;
|
||||||
|
|
||||||
aCfg->Read( KeepCvpcbOpenEntry, &m_keepCvpcbOpen, true );
|
aCfg->Read( KeepCvpcbOpenEntry, &m_keepCvpcbOpen, true );
|
||||||
aCfg->Read( FilterFootprintEntry, &m_filteringOptions, FOOTPRINTS_LISTBOX::UNFILTERED_FP_LIST );
|
aCfg->Read( FilterFootprintEntry, &m_filteringOptions, FOOTPRINTS_LISTBOX::UNFILTERED_FP_LIST );
|
||||||
}
|
}
|
||||||
|
|
|
@ -187,6 +187,9 @@ bool CVPCB_MAINFRAME::ReadNetListAndFpFiles( const std::string& aNetlist )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
LoadProjectFile();
|
LoadProjectFile();
|
||||||
|
|
||||||
|
wxSafeYield();
|
||||||
|
|
||||||
LoadFootprintFiles();
|
LoadFootprintFiles();
|
||||||
|
|
||||||
BuildFOOTPRINTS_LISTBOX();
|
BuildFOOTPRINTS_LISTBOX();
|
||||||
|
|
Loading…
Reference in New Issue