summaryrefslogtreecommitdiffstats
path: root/src/libs/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/libs/gui')
-rw-r--r--src/libs/gui/RenameWindow.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libs/gui/RenameWindow.cpp b/src/libs/gui/RenameWindow.cpp
index 6567799e..d5ef1b24 100644
--- a/src/libs/gui/RenameWindow.cpp
+++ b/src/libs/gui/RenameWindow.cpp
@@ -74,7 +74,8 @@ RenameWindow::name_changed()
} else if (!Path::is_valid_name(name)) {
_message_label->set_text("Name contains invalid characters");
_ok_button->property_sensitive() = false;
- } else if (App::instance().store()->object(_object->parent()->path().base() + name)) {
+ } else if ((App::instance().store()->object(_object->parent()->path().base() + name)) &&
+ (name != _object->path().name())) {
_message_label->set_text("An object already exists with that name.");
_ok_button->property_sensitive() = false;
} else if (name.length() == 0) {