diff options
author | David Robillard <d@drobilla.net> | 2014-08-30 04:08:26 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2014-08-30 04:08:26 +0000 |
commit | 03be139a8b4c3872bb5da0612a8e443bfb1409a2 (patch) | |
tree | 18d5a7b6347e41bf0d6c7469f6c671c5c92f3a0f | |
parent | 6f6ab43c58693a6c509500d5365eb36ad4a2a571 (diff) | |
download | ingen-03be139a8b4c3872bb5da0612a8e443bfb1409a2.tar.gz ingen-03be139a8b4c3872bb5da0612a8e443bfb1409a2.tar.bz2 ingen-03be139a8b4c3872bb5da0612a8e443bfb1409a2.zip |
Fix renaming symbol and label at the same time.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@5459 a436a847-0d15-0410-975c-d299462d15a1
-rw-r--r-- | src/gui/RenameWindow.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/gui/RenameWindow.cpp b/src/gui/RenameWindow.cpp index 880277ed..5525e5dc 100644 --- a/src/gui/RenameWindow.cpp +++ b/src/gui/RenameWindow.cpp @@ -116,6 +116,12 @@ RenameWindow::ok_clicked() Raul::Path path = _object->path(); const Atom& name_atom = _object->get_property(uris.lv2_name); + if (!label.empty() && (!name_atom.is_valid() || label != name_atom.ptr<char>())) { + _app->set_property(Node::path_to_uri(path), + uris.lv2_name, + _app->forge().alloc(label)); + } + if (Raul::Symbol::is_valid(symbol_str)) { const Raul::Symbol symbol(symbol_str); if (symbol != _object->symbol()) { @@ -124,12 +130,6 @@ RenameWindow::ok_clicked() } } - if (!label.empty() && (!name_atom.is_valid() || label != name_atom.ptr<char>())) { - _app->set_property(Node::path_to_uri(path), - uris.lv2_name, - _app->forge().alloc(label)); - } - hide(); } |