From 03be139a8b4c3872bb5da0612a8e443bfb1409a2 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 30 Aug 2014 04:08:26 +0000 Subject: 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 --- src/gui/RenameWindow.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src') 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())) { + _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())) { - _app->set_property(Node::path_to_uri(path), - uris.lv2_name, - _app->forge().alloc(label)); - } - hide(); } -- cgit v1.2.1