summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2012-05-23 00:57:57 +0000
committerDavid Robillard <d@drobilla.net>2012-05-23 00:57:57 +0000
commit7ca44cb8800a2800e58fadd0267416224650e08d (patch)
tree10a5a313b1fbf0fdbd9f16cd4ed1d4b8ed89fa74 /src/gui
parent2777835076e1ee319eaeee0a0b0acaad70931ac5 (diff)
downloadingen-7ca44cb8800a2800e58fadd0267416224650e08d.tar.gz
ingen-7ca44cb8800a2800e58fadd0267416224650e08d.tar.bz2
ingen-7ca44cb8800a2800e58fadd0267416224650e08d.zip
Fix crash when loading polyphonic patches.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4442 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/PatchView.cpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/gui/PatchView.cpp b/src/gui/PatchView.cpp
index d8e00ac2..b3b79ddf 100644
--- a/src/gui/PatchView.cpp
+++ b/src/gui/PatchView.cpp
@@ -171,10 +171,15 @@ PatchView::process_toggled()
void
PatchView::poly_changed()
{
- _app->interface()->set_property(
- _patch->path(),
- _app->uris().ingen_polyphony,
- _app->forge().make(_poly_spin->get_value_as_int()));
+ const int poly = _poly_spin->get_value_as_int();
+ if (_enable_signal && poly != (int)_patch->internal_poly()) {
+ std::cerr << "POLY SPIN CHANGE " << _patch->internal_poly()
+ << " => " << poly << std::endl;
+ _app->interface()->set_property(
+ _patch->path(),
+ _app->uris().ingen_polyphony,
+ _app->forge().make(poly));
+ }
}
void