summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gui/RenameWindow.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gui/RenameWindow.cpp b/src/gui/RenameWindow.cpp
index 0b89c962..a58ec2c2 100644
--- a/src/gui/RenameWindow.cpp
+++ b/src/gui/RenameWindow.cpp
@@ -83,8 +83,10 @@ 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)) &&
- (name != _object->path().name())) {
+ } else if (name == _object->path().name()) {
+ _message_label->set_text("");
+ _ok_button->property_sensitive() = false;
+ } else if ((App::instance().store()->object(_object->parent()->path().base() + name))) {
_message_label->set_text("An object already exists with that name.");
_ok_button->property_sensitive() = false;
} else if (name.length() == 0) {