summaryrefslogtreecommitdiff
path: root/gtk2_ardour/stripable_colorpicker.cc
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2017-03-12 16:54:38 +0100
committerRobin Gareus <robin@gareus.org>2017-03-12 16:54:38 +0100
commit400b3f82e7e66eed1ef80547830152b03e7d8a2e (patch)
tree824023b04e12e41943d86c2b9b8569133d55460c /gtk2_ardour/stripable_colorpicker.cc
parentbe6bfd12ebfa9b3c394fc67c8f3299fe0755c11b (diff)
Prevent multiple color-picker dialogs for a single stripable
Diffstat (limited to 'gtk2_ardour/stripable_colorpicker.cc')
-rw-r--r--gtk2_ardour/stripable_colorpicker.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/gtk2_ardour/stripable_colorpicker.cc b/gtk2_ardour/stripable_colorpicker.cc
index a7db947df8..2e341f4d7e 100644
--- a/gtk2_ardour/stripable_colorpicker.cc
+++ b/gtk2_ardour/stripable_colorpicker.cc
@@ -70,12 +70,19 @@ void
StripableColorDialog::reset ()
{
hide ();
+ if (_stripable && _stripable->active_color_picker() == this) {
+ _stripable->set_active_color_picker (0);
+ }
_stripable.reset ();
}
void
StripableColorDialog::popup (boost::shared_ptr<ARDOUR::Stripable> s)
{
+ if (s && s->active_color_picker()) {
+ s->active_color_picker()->present ();
+ return;
+ }
if (_stripable == s) {
/* keep modified color */
present ();
@@ -83,6 +90,7 @@ StripableColorDialog::popup (boost::shared_ptr<ARDOUR::Stripable> s)
}
_stripable = s;
+ _stripable->set_active_color_picker (this);
set_title (string_compose (_("Color Selection: %1"), s->name()));
get_colorsel()->set_has_opacity_control (false);