diff options
author | David Robillard <d@drobilla.net> | 2014-01-04 02:45:30 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2014-01-04 02:45:30 +0000 |
commit | bcc0b2d27797d07bf48de1b3a03dea7f878cb2b6 (patch) | |
tree | eb503c05191cc56e1a3389e7660db90ffb6c62e5 /src | |
parent | 732b2f88813a601d4048322fdcbe2081112366b2 (diff) | |
download | ingen-bcc0b2d27797d07bf48de1b3a03dea7f878cb2b6.tar.gz ingen-bcc0b2d27797d07bf48de1b3a03dea7f878cb2b6.tar.bz2 ingen-bcc0b2d27797d07bf48de1b3a03dea7f878cb2b6.zip |
Fix control updating with animated canvas.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@5254 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/App.hpp | 2 | ||||
-rw-r--r-- | src/gui/Port.cpp | 10 |
2 files changed, 3 insertions, 9 deletions
diff --git a/src/gui/App.hpp b/src/gui/App.hpp index 1fca42ea..11915949 100644 --- a/src/gui/App.hpp +++ b/src/gui/App.hpp @@ -18,8 +18,8 @@ #define INGEN_GUI_APP_HPP #include <cassert> -#include <string> #include <map> +#include <string> #include <utility> #include <gtkmm/aboutdialog.h> diff --git a/src/gui/Port.cpp b/src/gui/Port.cpp index ad03bc3b..92775483 100644 --- a/src/gui/Port.cpp +++ b/src/gui/Port.cpp @@ -76,7 +76,6 @@ Port::Port(App& app, app.style()->get_port_color(pm.get())) , _app(app) , _port_model(pm) - , _pressed(false) , _entered(false) , _flipped(flip) { @@ -181,7 +180,7 @@ Port::on_value_changed(double value) void Port::value_changed(const Atom& value) { - if (!_pressed && value.type() == _app.forge().Float) { + if (value.type() == _app.forge().Float && !get_grabbed()) { Ganv::Port::set_control_value(value.get<float>()); } } @@ -301,15 +300,10 @@ Port::on_event(GdkEvent* ev) return true; } } - _pressed = true; } else if (ev->button.button == 3) { return show_menu(&ev->button); } break; - case GDK_BUTTON_RELEASE: - if (ev->button.button == 1) { - _pressed = false; - } default: break; } @@ -416,7 +410,7 @@ Port::property_changed(const Raul::URI& key, const Atom& value) const URIs& uris = _app.uris(); if (value.type() == uris.forge.Float) { float val = value.get<float>(); - if (key == uris.ingen_value && !_pressed) { + if (key == uris.ingen_value && !get_grabbed()) { Ganv::Port::set_control_value(val); } else if (key == uris.lv2_minimum) { if (model()->port_property(uris.lv2_sampleRate)) { |