From: jfa Date: Mon, 20 Feb 2006 11:53:55 +0000 (+0000) Subject: PAL11563: Naming Policy. Suppress renaming to blank names. X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=c266b7d9707185766c57f898a3527373bc04b3cf;p=modules%2Fsmesh.git PAL11563: Naming Policy. Suppress renaming to blank names. --- diff --git a/src/SMESHGUI/SMESHGUI.cxx b/src/SMESHGUI/SMESHGUI.cxx index 3463c6373..2c3194048 100644 --- a/src/SMESHGUI/SMESHGUI.cxx +++ b/src/SMESHGUI/SMESHGUI.cxx @@ -83,13 +83,14 @@ #include "SalomeApp_Study.h" #include "SalomeApp_Application.h" #include "SalomeApp_CheckFileDlg.h" +#include "SalomeApp_ImportOperation.h" + #include "LightApp_DataOwner.h" #include "LightApp_Preferences.h" #include "LightApp_VTKSelector.h" #include "LightApp_Operation.h" #include "LightApp_UpdateFlags.h" - -#include "SalomeApp_ImportOperation.h" +#include "LightApp_NameDlg.h" #include #include @@ -125,7 +126,6 @@ #include #include #include -#include // BOOST Includes #include @@ -1762,10 +1762,8 @@ bool SMESHGUI::OnGUIEvent( int theCommandID ) { aName = anAttr; QString newName = QString(aName->Value().c_str()); - bool ok; - newName = QInputDialog::getText( tr( "Rename" ), tr( "Enter new name:" ), QLineEdit::Normal, - newName, &ok, desktop() ); - if ( ok && !newName.isEmpty() ) + newName = LightApp_NameDlg::getName(desktop(), newName); + if ( !newName.isEmpty() ) { //old source: aStudy->renameIObject( IObject, newName ); aName->SetValue( newName.latin1() );