From 7ca44cb8800a2800e58fadd0267416224650e08d Mon Sep 17 00:00:00 2001 From: David Robillard Date: Wed, 23 May 2012 00:57:57 +0000 Subject: Fix crash when loading polyphonic patches. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4442 a436a847-0d15-0410-975c-d299462d15a1 --- src/gui/PatchView.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'src/gui') 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 -- cgit v1.2.1