Salome HOME
It is recommended to use standard Qt QInputDialog instead QtxNameDlg
[modules/superv.git] / src / SUPERVGUI / SUPERVGUI.cxx
index 27243a404f9913abdc58c3e154166e0c077f26bc..cd78482843acd3da7c6eb370e7d8bf33b7c61d49 100644 (file)
@@ -40,7 +40,6 @@ using namespace boost;
 #include "OB_ListItem.h"
 #include "SalomeApp_Application.h"
 #include "SalomeApp_ImportOperation.h"
-#include "LightApp_NameDlg.h"
 #include "LightApp_SelectionMgr.h"
 #include "SalomeApp_Study.h"
 #include "SUIT_Desktop.h"
@@ -61,6 +60,7 @@ using namespace boost;
 
 #include CORBA_SERVER_HEADER(SALOMEDS_Attributes)
 
+#include <qinputdialog.h>
 #include <qmenubar.h>
 
 int SUPERVGUI::factory = 0;
@@ -514,8 +514,10 @@ void SUPERVGUI::renameDataflow() {
       if ( obj->FindAttribute(anAttr, "AttributeName") ) {
         _PTR(AttributeName) aName ( anAttr );
         QString nm = QString( aName->Value().c_str() );
-        nm = LightApp_NameDlg::getName( application()->desktop(), nm );
-        if ( !nm.isEmpty() ) {
+       bool ok;
+       nm = QInputDialog::getText( tr( "Rename" ), tr( "Enter new name:" ), QLineEdit::Normal,
+                                    nm, &ok, application()->desktop() );
+        if ( ok && !nm.isEmpty() ) {
           // sak : 24.11.04 : fix for PAL6898 : if rename fails (study locked),
           // a message box is displayed, and cursor is "wait cursor".  We think that "wait cursor"
           // is not neccessary here, because the rename operation is fast.