mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-24 07:27:44 +01:00
skip marker appearance should change to reflect global skip-playback setting
This commit is contained in:
parent
ea7ba3ed57
commit
ea17268558
2 changed files with 19 additions and 4 deletions
|
|
@ -95,6 +95,10 @@ RangeMarker::RangeMarker (ARDOUR::Location* l, PublicEditor& editor, ArdourCanva
|
|||
setup_line ();
|
||||
use_color ();
|
||||
setup_name_display ();
|
||||
|
||||
/* our appearance depends on some backend parameters, so pick up changes as necessary */
|
||||
|
||||
Config->ParameterChanged.connect (parameter_connection, invalidator (*this), boost::bind (&RangeMarker::parameter_changed, this, _1), gui_context());
|
||||
}
|
||||
|
||||
RangeMarker::~RangeMarker ()
|
||||
|
|
@ -102,6 +106,15 @@ RangeMarker::~RangeMarker ()
|
|||
delete _end_line;
|
||||
}
|
||||
|
||||
void
|
||||
RangeMarker::parameter_changed (const std::string& s)
|
||||
{
|
||||
if (s == "skip-playback") {
|
||||
/* reset our color to reflect global skip-playback setting */
|
||||
pick_basic_color (0);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
RangeMarker::use_color ()
|
||||
{
|
||||
|
|
@ -411,7 +424,7 @@ Marker::pick_basic_color (ArdourCanvas::Color c)
|
|||
} else if (_location->is_auto_punch()) {
|
||||
col = ARDOUR_UI::config()->get_canvasvar_LocationPunch();
|
||||
} else if (_location->is_skip()) {
|
||||
if (_location->is_skipping()) {
|
||||
if (_location->is_skipping() && Config->get_skip_playback()) {
|
||||
col = ARDOUR_UI::config()->get_canvasvar_LocationSkipping();
|
||||
} else {
|
||||
col = ARDOUR_UI::config()->get_canvasvar_LocationSkip();
|
||||
|
|
|
|||
|
|
@ -169,12 +169,14 @@ class RangeMarker : public Marker
|
|||
void canvas_height_set (double);
|
||||
|
||||
protected:
|
||||
void bounds_changed ();
|
||||
void _set_position (framepos_t, framepos_t);
|
||||
|
||||
framepos_t _end_frame;
|
||||
ArdourCanvas::Line* _end_line;
|
||||
Cairo::RefPtr<Cairo::Surface> _pattern;
|
||||
PBD::ScopedConnection parameter_connection;
|
||||
|
||||
void bounds_changed ();
|
||||
void _set_position (framepos_t, framepos_t);
|
||||
void parameter_changed (const std::string&);
|
||||
};
|
||||
|
||||
/** A variant on RangeMarker that is used to draw markers/locations on top of the ruler using
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue