From 9dc1dbb8ecf8eeab80c552bd78e698ab5b904913 Mon Sep 17 00:00:00 2001 From: vsv Date: Fri, 24 Jun 2005 13:53:00 +0000 Subject: [PATCH] Bug 9326: Popup on table objects --- src/VISUGUI/VisuGUI.cxx | 24 ++++++++++++++++++++++++ src/VISUGUI/VisuGUI.h | 2 ++ 2 files changed, 26 insertions(+) diff --git a/src/VISUGUI/VisuGUI.cxx b/src/VISUGUI/VisuGUI.cxx index 67d9b245..20c6389f 100644 --- a/src/VISUGUI/VisuGUI.cxx +++ b/src/VISUGUI/VisuGUI.cxx @@ -2306,6 +2306,30 @@ createPopupMenus() mgr->setRule( action( VISU_CREATE_MANY_PRS ), aRule + " and selcount>1", true ); } +//*************************************************************************** +void VisuGUI::contextMenuPopup( const QString& theClient, QPopupMenu* theMenu, QString& theTitle ) +{ + SalomeApp_Module::contextMenuPopup(theClient, theMenu, theTitle); + + SalomeApp_SelectionMgr* aSelectionMgr = GetSelectionMgr(this); + SALOME_ListIO aListIO; + aSelectionMgr->selectedObjects(aListIO); + if (aListIO.Extent() != 1) return; + + Handle(SALOME_InteractiveObject) anIO; + CORBA::Object_var anObject = GetSelectedObj( this, &anIO ); + _PTR(SObject) SO = GetCStudy( GetAppStudy( this ) )->FindObjectID( anIO->getEntry() ); + if (IsSObjectTable(SO)) { + action( VISU_SHOW_TABLE )->addTo(theMenu); + action( VISU_CREATE_CURVES )->addTo(theMenu); + action( VISU_EXPORT_TABLE )->addTo(theMenu); + theMenu->insertSeparator(); + action( VISU_DELETE )->addTo(theMenu); + } +} + + +//*************************************************************************** void VisuGUI:: windows( QMap& theMap ) const diff --git a/src/VISUGUI/VisuGUI.h b/src/VISUGUI/VisuGUI.h index f24d02dd..4c5d475e 100644 --- a/src/VISUGUI/VisuGUI.h +++ b/src/VISUGUI/VisuGUI.h @@ -61,6 +61,8 @@ public: virtual void studyActivated(); + virtual void contextMenuPopup( const QString& theClient, QPopupMenu* theMenu, QString& theTitle ); + public slots: virtual bool deactivateModule( SUIT_Study* ); virtual bool activateModule( SUIT_Study* ); -- 2.39.2