Salome HOME
It is recommended to use standard Qt QInputDialog instead QtxNameDlg
[modules/superv.git] / src / SUPERVGUI / SUPERVGUI_CanvasNode.cxx
index 8e0f8f52571a9ef81c535c37650123b042b0fee3..66bf49ba35e653b345c7e5f1d360c0c3d89f450c 100644 (file)
@@ -18,11 +18,12 @@ using namespace std;
 #include "SUPERVGUI_Information.h"
 #include "SUPERVGUI_Library.h"
 
-#include "LightApp_NameDlg.h"
 #include "SUIT_MessageBox.h"
 #include "LogWindow.h"
 #include "SUIT_Session.h"
 
+#include <qinputdialog.h>
+
 
 SUPERVGUI_CanvasNode::SUPERVGUI_CanvasNode( SUIT_ResourceMgr* mgr, QObject* theParent, SUPERVGUI_Main* theMain, SUPERV_CNode theNode, bool theIsCell):
     QObject(theParent),
@@ -350,9 +351,12 @@ bool SUPERVGUI_CanvasNode::setNodeName(QString aName)  {
 }
 
 void SUPERVGUI_CanvasNode::rename()  {
-  QString aName = LightApp_NameDlg::getName( SUIT_Session::session()->activeApplication()->desktop(), myNode->Name() );
+  bool ok;
+   QString aName = QInputDialog::getText( tr( "Rename" ), tr( "Enter new name:" ), QLineEdit::Normal,
+                                          myNode->Name(), &ok, SUIT_Session::session()->activeApplication()->desktop() );
+
   //mkr : modifications for fixing bug IPAL9972
-  if (!aName.isEmpty() && aName.compare( myNode->Name() ) != 0) {
+  if( ok && !aName.isEmpty() && aName.compare( myNode->Name() ) != 0) {
     setNodeName(aName);
   }
 }