Kicad: fix a crash when changing a project, if pcbnew was run and "Update PCB from Schematic" was run and Schematic editor never opened.
(In this case the schematic frame exists, but some members are not initialized as expected, and a crash happens when calling the schematic editor dtor) Minor other fix: avoid multiple very similar strings to translate in 3d_filename_resolver.cpp
This commit is contained in:
parent
973786d75d
commit
c146cc09eb
|
@ -559,7 +559,7 @@ bool S3D_FILENAME_RESOLVER::readPathList( void )
|
||||||
{
|
{
|
||||||
std::ostringstream ostr;
|
std::ostringstream ostr;
|
||||||
ostr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
|
ostr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
|
||||||
wxString errmsg = _( "could not open configuration file" );
|
wxString errmsg = _( "Could not open configuration file" );
|
||||||
ostr << " * " << errmsg.ToUTF8() << " '" << cfgname.ToUTF8() << "'";
|
ostr << " * " << errmsg.ToUTF8() << " '" << cfgname.ToUTF8() << "'";
|
||||||
wxLogTrace( MASK_3D_RESOLVER, "%s\n", ostr.str().c_str() );
|
wxLogTrace( MASK_3D_RESOLVER, "%s\n", ostr.str().c_str() );
|
||||||
return false;
|
return false;
|
||||||
|
@ -678,11 +678,10 @@ bool S3D_FILENAME_RESOLVER::writePathList( void )
|
||||||
{
|
{
|
||||||
std::ostringstream ostr;
|
std::ostringstream ostr;
|
||||||
ostr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
|
ostr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
|
||||||
wxString errmsg = _( "could not open configuration file " );
|
wxString errmsg = _( "Could not open configuration file" );
|
||||||
ostr << " * " << errmsg.ToUTF8() << " '" << cfgname.ToUTF8() << "'";
|
ostr << " * " << errmsg.ToUTF8() << " '" << cfgname.ToUTF8() << "'";
|
||||||
wxLogTrace( MASK_3D_RESOLVER, "%s\n", ostr.str().c_str() );
|
wxLogTrace( MASK_3D_RESOLVER, "%s\n", ostr.str().c_str() );
|
||||||
wxMessageBox( _( "Could not open configuration file" ),
|
wxMessageBox( errmsg, _( "Write 3D search path list" ) );
|
||||||
_( "Write 3D search path list" ) );
|
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -923,7 +922,7 @@ static bool getHollerith( const std::string& aString, size_t& aIndex, wxString&
|
||||||
{
|
{
|
||||||
std::ostringstream ostr;
|
std::ostringstream ostr;
|
||||||
ostr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
|
ostr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
|
||||||
wxString errmsg = _( "missing closing quote mark in config file" );
|
wxString errmsg = "missing closing quote mark in config file";
|
||||||
ostr << " * " << errmsg.ToUTF8() << "\n'" << aString << "'";
|
ostr << " * " << errmsg.ToUTF8() << "\n'" << aString << "'";
|
||||||
wxLogTrace( MASK_3D_RESOLVER, "%s\n", ostr.str().c_str() );
|
wxLogTrace( MASK_3D_RESOLVER, "%s\n", ostr.str().c_str() );
|
||||||
|
|
||||||
|
|
|
@ -691,7 +691,9 @@ void EDA_DRAW_FRAME::SaveSettings( wxConfigBase* aCfg )
|
||||||
aCfg->Write( baseCfgName + ShowGridEntryKeyword, IsGridVisible() );
|
aCfg->Write( baseCfgName + ShowGridEntryKeyword, IsGridVisible() );
|
||||||
aCfg->Write( baseCfgName + GridColorEntryKeyword, ( long ) GetGridColor() );
|
aCfg->Write( baseCfgName + GridColorEntryKeyword, ( long ) GetGridColor() );
|
||||||
aCfg->Write( baseCfgName + LastGridSizeIdKeyword, ( long ) m_LastGridSizeId );
|
aCfg->Write( baseCfgName + LastGridSizeIdKeyword, ( long ) m_LastGridSizeId );
|
||||||
aCfg->Write( baseCfgName + MaxUndoItemsEntry, long( GetScreen()->GetMaxUndoItems() ) );
|
|
||||||
|
if( GetScreen() )
|
||||||
|
aCfg->Write( baseCfgName + MaxUndoItemsEntry, long( GetScreen()->GetMaxUndoItems() ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue