From fd9ea1bc8675d51c15d33947345b97eeff910ca2 Mon Sep 17 00:00:00 2001 From: Christophe Bourcier Date: Thu, 3 May 2018 12:16:38 +0200 Subject: [PATCH] Workaround to make the context menu popup visible in KDE Plasma with compositor enabled --- src/LightApp/LightApp_Application.cxx | 40 +++++++++++++-------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/src/LightApp/LightApp_Application.cxx b/src/LightApp/LightApp_Application.cxx index 351397e10..bb5f312a2 100644 --- a/src/LightApp/LightApp_Application.cxx +++ b/src/LightApp/LightApp_Application.cxx @@ -4411,26 +4411,26 @@ void LightApp_Application::contextMenuPopup( const QString& type, QMenu* thePopu a->setShortcut( ob->shortcutKey(SUIT_DataBrowser::UpdateShortcut) ); } -#ifndef DISABLE_SALOMEOBJECT - if ( selMgr && ob ) { - SALOME_ListIO selected; - selMgr->selectedObjects( selected ); - if(selected.Extent() == 1){ - Handle(SALOME_InteractiveObject) anIObject = selected.First(); - SUIT_DataObject* obj = findObject(anIObject->getEntry()); - if(obj && obj->renameAllowed()) { - QAction* a = new QAction(tr("MEN_RENAME_OBJ"), thePopup); - connect( a, SIGNAL( triggered(bool) ), ob, SLOT( onStartEditing() ) ); - if ( ob->shortcutKey(SUIT_DataBrowser::RenameShortcut) ) - a->setShortcut( ob->shortcutKey(SUIT_DataBrowser::RenameShortcut) ); - - QList acts = thePopup->actions(); - QAction* firstAction = acts.count() > 0 ? acts.first() : 0; - thePopup->insertAction(firstAction,a); - } - } - } -#endif +// #ifndef DISABLE_SALOMEOBJECT +// if ( selMgr && ob ) { +// SALOME_ListIO selected; +// selMgr->selectedObjects( selected ); +// if(selected.Extent() == 1){ +// Handle(SALOME_InteractiveObject) anIObject = selected.First(); +// SUIT_DataObject* obj = findObject(anIObject->getEntry()); +// if(obj && obj->renameAllowed()) { +// QAction* a = new QAction(tr("MEN_RENAME_OBJ"), thePopup); +// connect( a, SIGNAL( triggered(bool) ), ob, SLOT( onStartEditing() ) ); +// if ( ob->shortcutKey(SUIT_DataBrowser::RenameShortcut) ) +// a->setShortcut( ob->shortcutKey(SUIT_DataBrowser::RenameShortcut) ); +// +// QList acts = thePopup->actions(); +// QAction* firstAction = acts.count() > 0 ? acts.first() : 0; +// thePopup->insertAction(firstAction,a); +// } +// } +// } +// #endif selMgr->setSelectionCacheEnabled( cacheIsOn ); } -- 2.39.2