Salome HOME
Changes in getPopupMenu() memthod:
authorasv <asv@opencascade.com>
Wed, 26 Jan 2005 13:33:35 +0000 (13:33 +0000)
committerasv <asv@opencascade.com>
Wed, 26 Jan 2005 13:33:35 +0000 (13:33 +0000)
myDeleteItem was removed from the class, it was deactivated in CanvasCellNode - successor of CanvasNode, now it is not even added to CanvasNode's menu if the view_type is TABLE.

src/SUPERVGUI/SUPERVGUI_CanvasNode.cxx
src/SUPERVGUI/SUPERVGUI_CanvasNode.h

index daf2074875978e9d080d9c78a09459a992f81b82..7bd5d6500a92a793451c652aecae29a8fd0cd91c 100644 (file)
@@ -57,7 +57,7 @@ SUPERVGUI_CanvasNode::SUPERVGUI_CanvasNode(QObject* theParent, SUPERVGUI_Main* t
   myLabelText = aNewComment;
 
   // mkr : if the SUPERVGUI_CavasCellNode created (for CANVASTABLE view), 
-  // we haven't create its ports
+  // we don't create the ports
   if (!theIsCell) {
     // create node ports
     isIgnore = true;
@@ -151,9 +151,11 @@ QPopupMenu* SUPERVGUI_CanvasNode::getPopupMenu(QWidget* theParent)
     const int type = getNodeType();
 
     // for all nodes except EndLoop and EndSwitch : Rename, Delete, Copy
-    if ( myMain->isEditable() && type != SUPERV::EndLoopNode && type != SUPERV::EndSwitchNode ) {
+    if ( myMain->isEditable() && type != SUPERV::EndLoopNode && type != SUPERV::EndSwitchNode &&
+       // asv 26.01.05 : don't allow nodes "edition" commands in Table view
+       myMain->getViewType() != CANVASTABLE ) { 
       popup->insertItem(tr("MSG_RENAME"), this, SLOT(rename()));
-      myDeleteItem = popup->insertItem(tr("MSG_DELETE"), this, SLOT(remove()));
+      popup->insertItem(tr("MSG_DELETE"), this, SLOT(remove()));
     }
     
     // tmp: Copy temporary does not work for Macro nodes...
index 12b6b2bb6fb12db204426bea6c3fc7d68cd31598..445c9a2fda06bf1314c75eda8829cf15aa2293e9 100644 (file)
@@ -111,7 +111,6 @@ class SUPERVGUI_CanvasNode : public QObject {
     SUPERVGUI_BrowseNodeDlg* myBrowseDlg;
 
     bool isIgnore;
-    int  myDeleteItem;
 
   protected slots:
     virtual void onDestroyed(QObject*);