update pad colors when selected track colors chane
This commit is contained in:
parent
a9a3b71807
commit
ae01ac2384
@ -1274,6 +1274,21 @@ Push2::pad_note (int row, int col) const
|
||||
return 0;
|
||||
}
|
||||
|
||||
void
|
||||
Push2::update_selection_color ()
|
||||
{
|
||||
boost::shared_ptr<MidiTrack> current_midi_track = current_pad_target.lock();
|
||||
|
||||
if (!current_midi_track) {
|
||||
return;
|
||||
}
|
||||
|
||||
selection_color = get_color_index (current_midi_track->presentation_info().color());
|
||||
contrast_color = get_color_index (ArdourCanvas::HSV (current_midi_track->presentation_info().color()).opposite().color());
|
||||
|
||||
reset_pad_colors ();
|
||||
}
|
||||
|
||||
void
|
||||
Push2::reset_pad_colors ()
|
||||
{
|
||||
|
@ -329,6 +329,8 @@ class Push2 : public ARDOUR::ControlProtocol
|
||||
int pad_note (int row, int col) const;
|
||||
PBD::Signal0<void> PadChange;
|
||||
|
||||
void update_selection_color ();
|
||||
|
||||
void set_pad_scale (int root, int octave, MusicalMode::Type mode, bool inkey);
|
||||
PBD::Signal0<void> ScaleChange;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user