Fix GTK compile errors and remove dead code.

Fixes: lp:1783993
* https://bugs.launchpad.net/kicad/+bug/1783993
This commit is contained in:
Jeff Young 2018-08-01 12:22:50 +01:00
parent 9322139baa
commit 6dbfa793e8
3 changed files with 11 additions and 13 deletions

View File

@ -80,7 +80,5 @@ double GetCircletoPolyCorrectionFactor( int aSegCountforCircle )
aSegCountforCircle = 6;
if( 1 || aSegCountforCircle > 64 )
return 1.0 / cos( M_PI / aSegCountforCircle );
return correction_factor[ aSegCountforCircle - 6 ];
}

View File

@ -250,10 +250,10 @@ MODULE* try_load_footprint( const wxFileName& aFileName, IO_MGR::PCB_FILE_T aFil
MODULE* FOOTPRINT_EDIT_FRAME::Import_Module( const wxString& aName )
{
wxString lastOpenedPathForLoading = m_mruPath;
wxConfigBase* config = Kiface().KifaceSettings();
wxConfigBase* cfg = Kiface().KifaceSettings();
if( config )
config->Read( EXPORT_IMPORT_LASTPATH_KEY, &lastOpenedPathForLoading );
if( cfg )
cfg->Read( EXPORT_IMPORT_LASTPATH_KEY, &lastOpenedPathForLoading );
wxFileName fn;
@ -274,10 +274,10 @@ MODULE* FOOTPRINT_EDIT_FRAME::Import_Module( const wxString& aName )
return NULL;
}
if( config ) // Save file path
if( cfg ) // Save file path
{
lastOpenedPathForLoading = fn.GetPath();
config->Write( EXPORT_IMPORT_LASTPATH_KEY, lastOpenedPathForLoading );
cfg->Write( EXPORT_IMPORT_LASTPATH_KEY, lastOpenedPathForLoading );
}
wxString moduleName;
@ -341,7 +341,7 @@ MODULE* FOOTPRINT_EDIT_FRAME::Import_Module( const wxString& aName )
void FOOTPRINT_EDIT_FRAME::Export_Module( MODULE* aModule )
{
wxFileName fn;
wxConfigBase* config = Kiface().KifaceSettings();
wxConfigBase* cfg = Kiface().KifaceSettings();
if( !aModule )
return;
@ -352,10 +352,10 @@ void FOOTPRINT_EDIT_FRAME::Export_Module( MODULE* aModule )
fn.SetExt( KiCadFootprintFileExtension );
if( config )
if( cfg )
{
wxString path;
config->Read( EXPORT_IMPORT_LASTPATH_KEY, &path, m_mruPath );
cfg->Read( EXPORT_IMPORT_LASTPATH_KEY, &path, m_mruPath );
fn.SetPath( path );
}
@ -367,9 +367,9 @@ void FOOTPRINT_EDIT_FRAME::Export_Module( MODULE* aModule )
fn = dlg.GetPath();
if( config ) // Save file path
if( cfg ) // Save file path
{
config->Write( EXPORT_IMPORT_LASTPATH_KEY, fn.GetPath() );
cfg->Write( EXPORT_IMPORT_LASTPATH_KEY, fn.GetPath() );
}
try

View File

@ -211,7 +211,7 @@ bool FP_TREE_SYNCHRONIZING_ADAPTER::GetAttr( wxDataViewItem const& aItem, unsign
#ifdef __WXGTK__
// The native wxGTK+ impl ignores background colour, so set the text colour instead.
// This works reasonably well in dark themes, and quite poorly in light ones....
if( node->LibId == m_libMgr->GetCurrentLibId() )
if( node->LibId == m_frame->GetCurrentLibId() )
{
aAttr.SetColour( wxSystemSettings::GetColour( wxSYS_COLOUR_HIGHLIGHT ) );
// mark modified part with bold font