diff options
Diffstat (limited to 'src/libs/gui/NewSubpatchWindow.cpp')
-rw-r--r-- | src/libs/gui/NewSubpatchWindow.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libs/gui/NewSubpatchWindow.cpp b/src/libs/gui/NewSubpatchWindow.cpp index 69c8471e..def57975 100644 --- a/src/libs/gui/NewSubpatchWindow.cpp +++ b/src/libs/gui/NewSubpatchWindow.cpp @@ -71,7 +71,8 @@ NewSubpatchWindow::name_changed() if (!Path::is_valid_name(name)) { _message_label->set_text("Name contains invalid characters."); _ok_button->property_sensitive() = false; - } else if (_patch->find_child(name)) { + } else if (App::instance().store()->find(_patch->path().base() + name) + != App::instance().store()->objects().end()) { _message_label->set_text("An object already exists with that name."); _ok_button->property_sensitive() = false; } else if (name.length() == 0) { |