From: asv Date: Wed, 26 Jan 2005 13:33:35 +0000 (+0000) Subject: Changes in getPopupMenu() memthod: X-Git-Tag: V2_2_0b2~13 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=1f679c6f6d0115608e41b2e82520bce9a389b837;p=modules%2Fsuperv.git Changes in getPopupMenu() memthod: 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. --- diff --git a/src/SUPERVGUI/SUPERVGUI_CanvasNode.cxx b/src/SUPERVGUI/SUPERVGUI_CanvasNode.cxx index daf2074..7bd5d65 100644 --- a/src/SUPERVGUI/SUPERVGUI_CanvasNode.cxx +++ b/src/SUPERVGUI/SUPERVGUI_CanvasNode.cxx @@ -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... diff --git a/src/SUPERVGUI/SUPERVGUI_CanvasNode.h b/src/SUPERVGUI/SUPERVGUI_CanvasNode.h index 12b6b2b..445c9a2 100644 --- a/src/SUPERVGUI/SUPERVGUI_CanvasNode.h +++ b/src/SUPERVGUI/SUPERVGUI_CanvasNode.h @@ -111,7 +111,6 @@ class SUPERVGUI_CanvasNode : public QObject { SUPERVGUI_BrowseNodeDlg* myBrowseDlg; bool isIgnore; - int myDeleteItem; protected slots: virtual void onDestroyed(QObject*);