Clean up c4de76c835
* consolidate redraws on property changes * use RAII to unwind _ignore_menu_action * replace comments, always add a space after a comment start never a Tab * clang-format
This commit is contained in:
parent
a908218676
commit
9d4a40ec61
@ -25,6 +25,7 @@
|
||||
|
||||
#include "pbd/compose.h"
|
||||
#include "pbd/convert.h"
|
||||
#include "pbd/unwind.h"
|
||||
|
||||
#include "ardour/region.h"
|
||||
#include "ardour/triggerbox.h"
|
||||
@ -257,7 +258,7 @@ TriggerEntry::render (ArdourCanvas::Rect const& area, Cairo::RefPtr<Cairo::Conte
|
||||
render_children (area, context);
|
||||
|
||||
if (_trigger.scene_isolated ()) {
|
||||
//left shadow
|
||||
/* left shadow */
|
||||
context->set_identity_matrix ();
|
||||
context->translate (self.x0, self.y0 - 0.5);
|
||||
Cairo::RefPtr<Cairo::LinearGradient> l_shadow = Cairo::LinearGradient::create (0, 0, scale * 12, 0);
|
||||
@ -270,7 +271,7 @@ TriggerEntry::render (ArdourCanvas::Rect const& area, Cairo::RefPtr<Cairo::Conte
|
||||
}
|
||||
|
||||
if (_trigger.index () == 1) {
|
||||
//drop-shadow at top
|
||||
/* drop-shadow at top */
|
||||
Cairo::RefPtr<Cairo::LinearGradient> drop_shadow_pattern = Cairo::LinearGradient::create (0.0, 0.0, 0.0, 6 * scale);
|
||||
drop_shadow_pattern->add_color_stop_rgba (0, 0, 0, 0, 0.7);
|
||||
drop_shadow_pattern->add_color_stop_rgba (1, 0, 0, 0, 0.0);
|
||||
@ -346,11 +347,11 @@ TriggerEntry::prop_change (PropertyChange const& change)
|
||||
need_pb = true;
|
||||
}
|
||||
|
||||
if (change.contains (ARDOUR::Properties::follow_action0)) {
|
||||
redraw ();
|
||||
}
|
||||
PropertyChange interesting_stuff;
|
||||
interesting_stuff.add (ARDOUR::Properties::follow_action0);
|
||||
interesting_stuff.add (ARDOUR::Properties::isolated);
|
||||
|
||||
if (change.contains (ARDOUR::Properties::isolated)) {
|
||||
if (change.contains (interesting_stuff)) {
|
||||
redraw ();
|
||||
}
|
||||
|
||||
@ -791,9 +792,8 @@ TriggerBoxUI::context_menu (uint64_t n)
|
||||
|
||||
items.push_back (CheckMenuElem (_("Cue Isolate"), sigc::bind (sigc::mem_fun (*this, &TriggerBoxUI::toggle_trigger_isolated), n)));
|
||||
if (_triggerbox.trigger (n)->scene_isolated ()) {
|
||||
_ignore_menu_action = true;
|
||||
PBD::Unwinder<bool> uw (_ignore_menu_action, true);
|
||||
dynamic_cast<Gtk::CheckMenuItem*> (&items.back ())->set_active (true);
|
||||
_ignore_menu_action = false;
|
||||
}
|
||||
|
||||
_context_menu->popup (1, gtk_get_current_event_time ());
|
||||
@ -813,8 +813,10 @@ TriggerBoxUI::toggle_trigger_isolated (uint64_t n)
|
||||
void
|
||||
TriggerBoxUI::clear_trigger (uint64_t n)
|
||||
{
|
||||
#if 0 // XXX
|
||||
Trigger* trigger = _triggerbox.trigger (n);
|
||||
// trigger->clear_trigger();
|
||||
trigger->clear_trigger();
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
|
Loading…
Reference in New Issue
Block a user