summaryrefslogtreecommitdiffstats
path: root/src/gui/NewSubpatchWindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/NewSubpatchWindow.cpp')
-rw-r--r--src/gui/NewSubpatchWindow.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/gui/NewSubpatchWindow.cpp b/src/gui/NewSubpatchWindow.cpp
index 3c1546d5..0026f8ef 100644
--- a/src/gui/NewSubpatchWindow.cpp
+++ b/src/gui/NewSubpatchWindow.cpp
@@ -78,13 +78,10 @@ NewSubpatchWindow::name_changed()
if (!Symbol::is_valid(name)) {
_message_label->set_text("Name contains invalid characters.");
_ok_button->property_sensitive() = false;
- } else if (_app->store()->find(_patch->path().base() + name)
- != _app->store()->end()) {
+ } else if (_app->store()->find(_patch->path().child(Symbol(name)))
+ != _app->store()->end()) {
_message_label->set_text("An object already exists with that name.");
_ok_button->property_sensitive() = false;
- } else if (name.length() == 0) {
- _message_label->set_text("");
- _ok_button->property_sensitive() = false;
} else {
_message_label->set_text("");
_ok_button->property_sensitive() = true;