mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-12-25 17:00:34 +05:00
It is recommended to use standard Qt QInputDialog instead QtxNameDlg
This commit is contained in:
parent
8d0c572759
commit
9280276b1d
@ -81,7 +81,6 @@
|
|||||||
|
|
||||||
#include "SalomeApp_Tools.h"
|
#include "SalomeApp_Tools.h"
|
||||||
#include "SalomeApp_Study.h"
|
#include "SalomeApp_Study.h"
|
||||||
#include "LightApp_NameDlg.h"
|
|
||||||
#include "LightApp_DataOwner.h"
|
#include "LightApp_DataOwner.h"
|
||||||
#include "SalomeApp_Application.h"
|
#include "SalomeApp_Application.h"
|
||||||
#include "LightApp_Preferences.h"
|
#include "LightApp_Preferences.h"
|
||||||
@ -126,6 +125,7 @@
|
|||||||
#include <qstring.h>
|
#include <qstring.h>
|
||||||
#include <qwidget.h>
|
#include <qwidget.h>
|
||||||
#include <qaction.h>
|
#include <qaction.h>
|
||||||
|
#include <qinputdialog.h>
|
||||||
|
|
||||||
// BOOST Includes
|
// BOOST Includes
|
||||||
#include <boost/shared_ptr.hpp>
|
#include <boost/shared_ptr.hpp>
|
||||||
@ -1783,8 +1783,10 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
|
|||||||
{
|
{
|
||||||
aName = anAttr;
|
aName = anAttr;
|
||||||
QString newName = QString(aName->Value().c_str());
|
QString newName = QString(aName->Value().c_str());
|
||||||
newName = LightApp_NameDlg::getName( desktop(), newName );
|
bool ok;
|
||||||
if ( !newName.isEmpty() )
|
newName = QInputDialog::getText( tr( "Rename" ), tr( "Enter new name:" ), QLineEdit::Normal,
|
||||||
|
newName, &ok, desktop() );
|
||||||
|
if ( ok && !newName.isEmpty() )
|
||||||
{
|
{
|
||||||
//old source: aStudy->renameIObject( IObject, newName );
|
//old source: aStudy->renameIObject( IObject, newName );
|
||||||
aName->SetValue( newName.latin1() );
|
aName->SetValue( newName.latin1() );
|
||||||
|
Loading…
Reference in New Issue
Block a user