diff --git a/common/tool/action_menu.cpp b/common/tool/action_menu.cpp index 0337d456a5..79925aa5c0 100644 --- a/common/tool/action_menu.cpp +++ b/common/tool/action_menu.cpp @@ -167,7 +167,7 @@ wxMenuItem* ACTION_MENU::Add( const TOOL_ACTION& aAction, bool aIsCheckmarkEntry BITMAPS icon = aAction.GetIcon(); // Allow the label to be overridden at point of use - wxString menuLabel = aOverrideLabel.IsEmpty() ? aAction.GetMenuItem() : aOverrideLabel; + wxString menuLabel = aOverrideLabel.IsEmpty() ? aAction.GetMenuItem() : aOverrideLabel; wxMenuItem* item = new wxMenuItem( this, aAction.GetUIId(), menuLabel, aAction.GetDescription(), diff --git a/common/tool/common_control.cpp b/common/tool/common_control.cpp index 00244f7d2e..5aa1ec6851 100644 --- a/common/tool/common_control.cpp +++ b/common/tool/common_control.cpp @@ -2,7 +2,7 @@ * This program source code file is part of KiCad, a free EDA CAD application. * * Copyright (C) 2014-2016 CERN - * Copyright (C) 2021 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 2021-2022 KiCad Developers, see AUTHORS.txt for contributors. * @author Maciej Suminski * * This program is free software; you can redistribute it and/or @@ -164,7 +164,7 @@ int COMMON_CONTROL::ShowPlayer( const TOOL_EVENT& aEvent ) KIWAY_PLAYER* editor = m_frame->Kiway().Player( playerType, true ); // editor can be null if Player() fails: - wxCHECK_MSG( editor != nullptr, 0, "Cannot open/create the editor frame" ); + wxCHECK_MSG( editor != nullptr, 0, wxT( "Cannot open/create the editor frame" ) ); // Needed on Windows, other platforms do not use it, but it creates no issue if( editor->IsIconized() ) @@ -187,8 +187,8 @@ int COMMON_CONTROL::ShowHelp( const TOOL_EVENT& aEvent ) wxString msg; // the URL of help files is "https://docs.kicad.org////" - const wxString baseUrl = URL_DOCUMENTATION + GetMajorMinorVersion() + "/" - + Pgm().GetLocale()->GetName().BeforeLast( '_' ) + "/"; + const wxString baseUrl = URL_DOCUMENTATION + GetMajorMinorVersion() + wxT( "/" ) + + Pgm().GetLocale()->GetName().BeforeLast( '_' ) + wxT( "/" ); /* We have to get document for beginners, * or the full specific doc diff --git a/common/tool/conditional_menu.cpp b/common/tool/conditional_menu.cpp index 8a434efe56..bf15173658 100644 --- a/common/tool/conditional_menu.cpp +++ b/common/tool/conditional_menu.cpp @@ -107,12 +107,14 @@ void CONDITIONAL_MENU::Resolve() Evaluate( g_resolveDummySelection ); UpdateAll(); - runOnSubmenus( [] ( ACTION_MENU* aMenu ) { - CONDITIONAL_MENU* conditionalMenu = dynamic_cast( aMenu ); + runOnSubmenus( + [] ( ACTION_MENU* aMenu ) + { + CONDITIONAL_MENU* conditionalMenu = dynamic_cast( aMenu ); - if( conditionalMenu ) - conditionalMenu->Resolve(); - } ); + if( conditionalMenu ) + conditionalMenu->Resolve(); + } ); } @@ -186,13 +188,13 @@ void CONDITIONAL_MENU::Evaluate( SELECTION& aSelection ) // they are updated. This is also required on GTK to make sure the menus have the proper // size when created. runOnSubmenus( - [&aSelection]( ACTION_MENU* aMenu ) - { - CONDITIONAL_MENU* conditionalMenu = dynamic_cast( aMenu ); + [&aSelection]( ACTION_MENU* aMenu ) + { + CONDITIONAL_MENU* conditionalMenu = dynamic_cast( aMenu ); - if( conditionalMenu ) - conditionalMenu->Evaluate( aSelection ); - } ); + if( conditionalMenu ) + conditionalMenu->Evaluate( aSelection ); + } ); } @@ -210,6 +212,7 @@ void CONDITIONAL_MENU::addEntry( ENTRY aEntry ) m_entries.insert( it, aEntry ); } + CONDITIONAL_MENU::ENTRY::ENTRY( const ENTRY& aEntry ) { m_type = aEntry.m_type; diff --git a/common/tool/tool_menu.cpp b/common/tool/tool_menu.cpp index 651dca319d..0b0555f80e 100644 --- a/common/tool/tool_menu.cpp +++ b/common/tool/tool_menu.cpp @@ -1,7 +1,7 @@ /* * This program source code file is part of KiCad, a free EDA CAD application. * - * Copyright (C) 2017-2019 KiCad Developers, see CHANGELOG.txt for contributors. + * Copyright (C) 2017-2022 KiCad Developers, see CHANGELOG.txt for contributors. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -26,8 +26,6 @@ #include #include #include -#include -#include #include diff --git a/common/tool/zoom_menu.cpp b/common/tool/zoom_menu.cpp index d6f4166dd9..d67ffce45b 100644 --- a/common/tool/zoom_menu.cpp +++ b/common/tool/zoom_menu.cpp @@ -30,9 +30,7 @@ #include #include #include -#include #include -#include using namespace std::placeholders; diff --git a/eeschema/tools/ee_selection_tool.cpp b/eeschema/tools/ee_selection_tool.cpp index 7fb1928393..228e478dc6 100644 --- a/eeschema/tools/ee_selection_tool.cpp +++ b/eeschema/tools/ee_selection_tool.cpp @@ -281,8 +281,10 @@ void EE_SELECTION_TOOL::Reset( RESET_REASON aReason ) m_isSymbolViewer = symbolViewerFrame != nullptr; } else + { // Restore previous properties of selected items and remove them from containers ClearSelection(); + } // Reinsert the VIEW_GROUP, in case it was removed from the VIEW getView()->Remove( &m_selection );