From c266b7d9707185766c57f898a3527373bc04b3cf Mon Sep 17 00:00:00 2001 From: jfa Date: Mon, 20 Feb 2006 11:53:55 +0000 Subject: [PATCH] PAL11563: Naming Policy. Suppress renaming to blank names. --- src/SMESHGUI/SMESHGUI.cxx | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) 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() ); -- 2.39.2