Formatting.
This commit is contained in:
parent
4c81bac9e3
commit
6d8507d44f
|
@ -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(),
|
||||
|
|
|
@ -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 <maciej.suminski@cern.ch>
|
||||
*
|
||||
* 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/<version>/<language>/<name>/"
|
||||
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
|
||||
|
|
|
@ -107,12 +107,14 @@ void CONDITIONAL_MENU::Resolve()
|
|||
Evaluate( g_resolveDummySelection );
|
||||
UpdateAll();
|
||||
|
||||
runOnSubmenus( [] ( ACTION_MENU* aMenu ) {
|
||||
CONDITIONAL_MENU* conditionalMenu = dynamic_cast<CONDITIONAL_MENU*>( aMenu );
|
||||
runOnSubmenus(
|
||||
[] ( ACTION_MENU* aMenu )
|
||||
{
|
||||
CONDITIONAL_MENU* conditionalMenu = dynamic_cast<CONDITIONAL_MENU*>( 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<CONDITIONAL_MENU*>( aMenu );
|
||||
[&aSelection]( ACTION_MENU* aMenu )
|
||||
{
|
||||
CONDITIONAL_MENU* conditionalMenu = dynamic_cast<CONDITIONAL_MENU*>( 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;
|
||||
|
|
|
@ -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 <tool/tool_interactive.h>
|
||||
#include <tool/action_menu.h>
|
||||
#include <tool/actions.h>
|
||||
#include <tool/zoom_menu.h>
|
||||
#include <tool/grid_menu.h>
|
||||
#include <tool/selection.h>
|
||||
|
||||
|
||||
|
|
|
@ -30,9 +30,7 @@
|
|||
#include <tool/actions.h>
|
||||
#include <gal/graphics_abstraction_layer.h>
|
||||
#include <bitmaps.h>
|
||||
#include <convert_to_biu.h>
|
||||
#include <functional>
|
||||
#include <zoom_defines.h>
|
||||
|
||||
using namespace std::placeholders;
|
||||
|
||||
|
|
|
@ -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 );
|
||||
|
|
Loading…
Reference in New Issue