Fix GTK compile errors and remove dead code.
Fixes: lp:1783993 * https://bugs.launchpad.net/kicad/+bug/1783993
This commit is contained in:
parent
9322139baa
commit
6dbfa793e8
|
@ -80,7 +80,5 @@ double GetCircletoPolyCorrectionFactor( int aSegCountforCircle )
|
||||||
aSegCountforCircle = 6;
|
aSegCountforCircle = 6;
|
||||||
if( 1 || aSegCountforCircle > 64 )
|
if( 1 || aSegCountforCircle > 64 )
|
||||||
return 1.0 / cos( M_PI / aSegCountforCircle );
|
return 1.0 / cos( M_PI / aSegCountforCircle );
|
||||||
|
|
||||||
return correction_factor[ aSegCountforCircle - 6 ];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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 )
|
MODULE* FOOTPRINT_EDIT_FRAME::Import_Module( const wxString& aName )
|
||||||
{
|
{
|
||||||
wxString lastOpenedPathForLoading = m_mruPath;
|
wxString lastOpenedPathForLoading = m_mruPath;
|
||||||
wxConfigBase* config = Kiface().KifaceSettings();
|
wxConfigBase* cfg = Kiface().KifaceSettings();
|
||||||
|
|
||||||
if( config )
|
if( cfg )
|
||||||
config->Read( EXPORT_IMPORT_LASTPATH_KEY, &lastOpenedPathForLoading );
|
cfg->Read( EXPORT_IMPORT_LASTPATH_KEY, &lastOpenedPathForLoading );
|
||||||
|
|
||||||
wxFileName fn;
|
wxFileName fn;
|
||||||
|
|
||||||
|
@ -274,10 +274,10 @@ MODULE* FOOTPRINT_EDIT_FRAME::Import_Module( const wxString& aName )
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( config ) // Save file path
|
if( cfg ) // Save file path
|
||||||
{
|
{
|
||||||
lastOpenedPathForLoading = fn.GetPath();
|
lastOpenedPathForLoading = fn.GetPath();
|
||||||
config->Write( EXPORT_IMPORT_LASTPATH_KEY, lastOpenedPathForLoading );
|
cfg->Write( EXPORT_IMPORT_LASTPATH_KEY, lastOpenedPathForLoading );
|
||||||
}
|
}
|
||||||
|
|
||||||
wxString moduleName;
|
wxString moduleName;
|
||||||
|
@ -341,7 +341,7 @@ MODULE* FOOTPRINT_EDIT_FRAME::Import_Module( const wxString& aName )
|
||||||
void FOOTPRINT_EDIT_FRAME::Export_Module( MODULE* aModule )
|
void FOOTPRINT_EDIT_FRAME::Export_Module( MODULE* aModule )
|
||||||
{
|
{
|
||||||
wxFileName fn;
|
wxFileName fn;
|
||||||
wxConfigBase* config = Kiface().KifaceSettings();
|
wxConfigBase* cfg = Kiface().KifaceSettings();
|
||||||
|
|
||||||
if( !aModule )
|
if( !aModule )
|
||||||
return;
|
return;
|
||||||
|
@ -352,10 +352,10 @@ void FOOTPRINT_EDIT_FRAME::Export_Module( MODULE* aModule )
|
||||||
|
|
||||||
fn.SetExt( KiCadFootprintFileExtension );
|
fn.SetExt( KiCadFootprintFileExtension );
|
||||||
|
|
||||||
if( config )
|
if( cfg )
|
||||||
{
|
{
|
||||||
wxString path;
|
wxString path;
|
||||||
config->Read( EXPORT_IMPORT_LASTPATH_KEY, &path, m_mruPath );
|
cfg->Read( EXPORT_IMPORT_LASTPATH_KEY, &path, m_mruPath );
|
||||||
fn.SetPath( path );
|
fn.SetPath( path );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -367,9 +367,9 @@ void FOOTPRINT_EDIT_FRAME::Export_Module( MODULE* aModule )
|
||||||
|
|
||||||
fn = dlg.GetPath();
|
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
|
try
|
||||||
|
|
|
@ -211,7 +211,7 @@ bool FP_TREE_SYNCHRONIZING_ADAPTER::GetAttr( wxDataViewItem const& aItem, unsign
|
||||||
#ifdef __WXGTK__
|
#ifdef __WXGTK__
|
||||||
// The native wxGTK+ impl ignores background colour, so set the text colour instead.
|
// 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....
|
// 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 ) );
|
aAttr.SetColour( wxSystemSettings::GetColour( wxSYS_COLOUR_HIGHLIGHT ) );
|
||||||
// mark modified part with bold font
|
// mark modified part with bold font
|
||||||
|
|
Loading…
Reference in New Issue