From 37b166348aac3c0dc3ea85ce88de4abdba81da83 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Tue, 27 Aug 2019 08:55:17 +0200 Subject: [PATCH] Fix compil error and minor compil warnings --- common/dialogs/dialog_page_settings.cpp | 5 ++--- common/tool/edit_points.cpp | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/common/dialogs/dialog_page_settings.cpp b/common/dialogs/dialog_page_settings.cpp index 9f28064da7..58003e7202 100644 --- a/common/dialogs/dialog_page_settings.cpp +++ b/common/dialogs/dialog_page_settings.cpp @@ -134,9 +134,8 @@ DIALOG_PAGES_SETTINGS::DIALOG_PAGES_SETTINGS( EDA_DRAW_FRAME* parent, wxSize aMa DIALOG_PAGES_SETTINGS::~DIALOG_PAGES_SETTINGS() { - wxConfigBase* config = Kiface().KifaceSettings(); - #ifdef EESCHEMA + wxConfigBase* config = Kiface().KifaceSettings(); config->Write( KEY_EXPORT_REVISION, m_RevisionExport->GetValue() ); config->Write( KEY_EXPORT_DATE, m_DateExport->GetValue() ); config->Write( KEY_EXPORT_TITLE, m_TitleExport->GetValue() ); @@ -159,7 +158,6 @@ DIALOG_PAGES_SETTINGS::~DIALOG_PAGES_SETTINGS() void DIALOG_PAGES_SETTINGS::initDialog() { - wxConfigBase* config = Kiface().KifaceSettings(); wxString msg; // initialize page format choice box and page format list. @@ -223,6 +221,7 @@ void DIALOG_PAGES_SETTINGS::initDialog() m_TextComment9->SetValue( m_tb.GetComment( 8 ) ); #ifdef EESCHEMA + wxConfigBase* config = Kiface().KifaceSettings(); m_RevisionExport->SetValue( config->ReadBool( KEY_EXPORT_REVISION, false ) ); m_DateExport->SetValue( config->ReadBool( KEY_EXPORT_DATE, false ) ); m_TitleExport->SetValue( config->ReadBool( KEY_EXPORT_TITLE, false ) ); diff --git a/common/tool/edit_points.cpp b/common/tool/edit_points.cpp index 01d6ce63f9..42ec3730e4 100644 --- a/common/tool/edit_points.cpp +++ b/common/tool/edit_points.cpp @@ -45,7 +45,7 @@ EDIT_POINTS::EDIT_POINTS( EDA_ITEM* aParent ) EDIT_POINT* EDIT_POINTS::FindPoint( const VECTOR2I& aLocation, KIGFX::VIEW *aView ) // fixme: ugly { - unsigned size = std::abs( KiROUND( aView->ToWorld( EDIT_POINT::POINT_SIZE ) ) ); + unsigned size = std::abs( KiROUND( aView->ToWorld( EDIT_POINT::POINT_SIZE ) ) ); if( m_allowPoints ) {