summaryrefslogtreecommitdiffstats
path: root/src/libs/gui/LoadSubpatchWindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/libs/gui/LoadSubpatchWindow.cpp')
-rw-r--r--src/libs/gui/LoadSubpatchWindow.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/libs/gui/LoadSubpatchWindow.cpp b/src/libs/gui/LoadSubpatchWindow.cpp
index d3628e64..42058578 100644
--- a/src/libs/gui/LoadSubpatchWindow.cpp
+++ b/src/libs/gui/LoadSubpatchWindow.cpp
@@ -144,7 +144,6 @@ LoadSubpatchWindow::ok_clicked()
// If unset load_patch will load values
optional<const string&> name;
- optional<uint32_t> poly;
string name_str = "";
if (_name_from_user_radio->get_active()) {
@@ -152,13 +151,15 @@ LoadSubpatchWindow::ok_clicked()
name = name_str;
}
- if (_poly_from_user_radio->get_active())
- poly = _poly_spinbutton->get_value_as_int();
- else if (_poly_from_parent_radio->get_active())
- poly = _patch->poly();
+ if (_poly_from_user_radio->get_active()) {
+ cerr << "Overriding poly: " << _poly_spinbutton->get_value_as_int() << endl;
+ _initial_data.insert(make_pair("ingen:polyphony", (int)_poly_spinbutton->get_value_as_int()));
+ } else if (_poly_from_parent_radio->get_active()) {
+ _initial_data.insert(make_pair("ingen:polyphony", (int)_patch->poly()));
+ }
App::instance().loader()->load_patch(false, get_uri(), "/",
- _initial_data, _patch->path(), name, poly);
+ _initial_data, _patch->path(), name);
hide();
}