Salome HOME
projects
/
modules
/
shaper.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
b5038cb
)
Fix for the issue #2754 : the rename error message
author
mpv
<mpv@opencascade.com>
Wed, 30 Jan 2019 08:14:06 +0000
(11:14 +0300)
committer
mpv
<mpv@opencascade.com>
Wed, 30 Jan 2019 08:14:06 +0000
(11:14 +0300)
src/XGUI/XGUI_Tools.cpp
patch
|
blob
|
history
diff --git
a/src/XGUI/XGUI_Tools.cpp
b/src/XGUI/XGUI_Tools.cpp
index e058ff8cf112f202a6e9ed898fb2fc67dff0d9e6..e28c4ac4357d044b656ce1ff45a9fb90c0ffc3bb 100644
(file)
--- a/
src/XGUI/XGUI_Tools.cpp
+++ b/
src/XGUI/XGUI_Tools.cpp
@@
-171,8
+171,8
@@
bool canRename(const ObjectPtr& theObject, const QString& theName)
ObjectPtr aObj =
aDoc->objectByName(aType, theName.toStdString());
ObjectPtr aObj =
aDoc->objectByName(aType, theName.toStdString());
- if (aObj.get()) {
- QString aErrMsg(QObject::tr("
%1 with name %2 already exists
.").
+ if (aObj.get()
&& theObject != aObj
) {
+ QString aErrMsg(QObject::tr("
Name %2 already exists in %1
.").
arg(aType.c_str()).arg(theName));
// We can not use here a dialog box for message -
// it will crash editing process in ObjectBrowser
arg(aType.c_str()).arg(theName));
// We can not use here a dialog box for message -
// it will crash editing process in ObjectBrowser