From: Christophe Bourcier Date: Thu, 3 May 2018 10:16:38 +0000 (+0200) Subject: Workaround to make the context menu popup visible in KDE Plasma with compositor enabled X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=fd9ea1bc8675d51c15d33947345b97eeff910ca2;p=modules%2Fgui.git Workaround to make the context menu popup visible in KDE Plasma with compositor enabled --- 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 ); }