diff options
author | David Robillard <d@drobilla.net> | 2006-10-28 04:59:44 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2006-10-28 04:59:44 +0000 |
commit | 90ab0227e7ce1abcb5b0b4eb455aa3c3845065d3 (patch) | |
tree | feea187323d05592e66ad02c772a4d083dbc173a /src/progs/ingenuity/LoadSubpatchWindow.cpp | |
parent | f8e09808b7a51b474cbee66442cf7a03eed9010a (diff) | |
download | ingen-90ab0227e7ce1abcb5b0b4eb455aa3c3845065d3.tar.gz ingen-90ab0227e7ce1abcb5b0b4eb455aa3c3845065d3.tar.bz2 ingen-90ab0227e7ce1abcb5b0b4eb455aa3c3845065d3.zip |
Added proper new loading interface to Serializer, updated everything that uses it (no actual implementation yet).
git-svn-id: http://svn.drobilla.net/lad/ingen@194 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/progs/ingenuity/LoadSubpatchWindow.cpp')
-rw-r--r-- | src/progs/ingenuity/LoadSubpatchWindow.cpp | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/src/progs/ingenuity/LoadSubpatchWindow.cpp b/src/progs/ingenuity/LoadSubpatchWindow.cpp index 9aea1bd6..6a8aa24d 100644 --- a/src/progs/ingenuity/LoadSubpatchWindow.cpp +++ b/src/progs/ingenuity/LoadSubpatchWindow.cpp @@ -136,20 +136,23 @@ LoadSubpatchWindow::ok_clicked() { assert(m_patch); - const string filename = get_filename(); - - string name = ""; - int poly = 1; + // If unset load_patch will load values + optional<const string&> name; + optional<size_t> poly; + string name_str = ""; - if (m_name_from_user_radio->get_active()) - name = m_name_entry->get_text(); + if (m_name_from_user_radio->get_active()) { + name_str = m_name_entry->get_text(); + name = name_str; + } if (m_poly_from_user_radio->get_active()) poly = m_poly_spinbutton->get_value_as_int(); else if (m_poly_from_parent_radio->get_active()) poly = m_patch->poly(); - App::instance().loader()->load_patch(filename, m_patch->path(), name, poly, m_initial_data); + App::instance().loader()->load_patch(false, get_filename(), "/", + m_initial_data, m_patch->parent()->path(), name, poly); hide(); } |