From 788972554b148f7f7e5eff8759ce8114882c655f Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Mon, 23 Oct 2017 19:11:32 +0200 Subject: [PATCH] minor fix --- common/tool/context_menu.cpp | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/common/tool/context_menu.cpp b/common/tool/context_menu.cpp index c5500a6efe..ffe55b27ed 100644 --- a/common/tool/context_menu.cpp +++ b/common/tool/context_menu.cpp @@ -60,24 +60,19 @@ CONTEXT_MENU::~CONTEXT_MENU() */ static void set_wxMenuIcon( wxMenuItem* aMenu, const BITMAP_OPAQUE* aIcon ) { - bool useImagesInMenus = Pgm().GetUseIconsInMenus(); + // Retrieve the global applicaton show icon option: + bool useImagesInMenus = Pgm().GetUseIconsInMenus(); - if( aIcon && useImagesInMenus ) - { - aMenu->SetBitmap( KiBitmap( aIcon ) ); - } + if( aIcon && useImagesInMenus ) + { + aMenu->SetBitmap( KiBitmap( aIcon ) ); + } } void CONTEXT_MENU::SetIcon( const BITMAP_OPAQUE* aIcon ) { - // Retrieve the global applicaton show icon option: - bool useImagesInMenus = Pgm().GetUseIconsInMenus(); - - if( useImagesInMenus ) - m_icon = aIcon; - else - m_icon = nullptr; + m_icon = aIcon; }