mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-06 14:54:56 +01:00
Watch for route colour changes and update the summary accordingly. Fixes #3692.
git-svn-id: svn://localhost/ardour2/branches/3.0@8480 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
41264273ec
commit
150d3fdfbf
3 changed files with 24 additions and 4 deletions
|
|
@ -4854,14 +4854,13 @@ Editor::handle_new_route (RouteList& routes)
|
||||||
}
|
}
|
||||||
|
|
||||||
_routes->routes_added (new_views);
|
_routes->routes_added (new_views);
|
||||||
|
_summary->routes_added (new_views);
|
||||||
|
|
||||||
if (show_editor_mixer_when_tracks_arrive) {
|
if (show_editor_mixer_when_tracks_arrive) {
|
||||||
show_editor_mixer (true);
|
show_editor_mixer (true);
|
||||||
}
|
}
|
||||||
|
|
||||||
editor_list_button.set_sensitive (true);
|
editor_list_button.set_sensitive (true);
|
||||||
|
|
||||||
_summary->set_dirty ();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
||||||
|
|
@ -29,6 +29,7 @@
|
||||||
#include "editor_routes.h"
|
#include "editor_routes.h"
|
||||||
#include "editor_cursors.h"
|
#include "editor_cursors.h"
|
||||||
#include "mouse_cursors.h"
|
#include "mouse_cursors.h"
|
||||||
|
#include "route_time_axis.h"
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
using namespace ARDOUR;
|
using namespace ARDOUR;
|
||||||
|
|
@ -792,3 +793,22 @@ EditorSummary::editor_y_to_summary (double y) const
|
||||||
|
|
||||||
return sy;
|
return sy;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
EditorSummary::routes_added (list<RouteTimeAxisView*> const & r)
|
||||||
|
{
|
||||||
|
/* Connect to gui_changed() on the routes so that we know when their colour has changed */
|
||||||
|
for (list<RouteTimeAxisView*>::const_iterator i = r.begin(); i != r.end(); ++i) {
|
||||||
|
(*i)->route()->gui_changed.connect (*this, invalidator (*this), ui_bind (&EditorSummary::route_gui_changed, this, _1), gui_context ());
|
||||||
|
}
|
||||||
|
|
||||||
|
set_dirty ();
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
EditorSummary::route_gui_changed (string c)
|
||||||
|
{
|
||||||
|
if (c == "color") {
|
||||||
|
set_dirty ();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Copyright (C) 2009 Paul Davis
|
Copyright (C) 2009 Paul Davis
|
||||||
|
|
||||||
|
|
@ -33,13 +32,14 @@ class Editor;
|
||||||
/** Class to provide a visual summary of the contents of an editor window; represents
|
/** Class to provide a visual summary of the contents of an editor window; represents
|
||||||
* the whole session as a set of lines, one per region view.
|
* the whole session as a set of lines, one per region view.
|
||||||
*/
|
*/
|
||||||
class EditorSummary : public CairoWidget, public EditorComponent, public ARDOUR::SessionHandlePtr
|
class EditorSummary : public CairoWidget, public EditorComponent, public ARDOUR::SessionHandlePtr, public PBD::ScopedConnectionList
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
EditorSummary (Editor *);
|
EditorSummary (Editor *);
|
||||||
|
|
||||||
void set_session (ARDOUR::Session *);
|
void set_session (ARDOUR::Session *);
|
||||||
void set_overlays_dirty ();
|
void set_overlays_dirty ();
|
||||||
|
void routes_added (std::list<RouteTimeAxisView*> const &);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
|
@ -79,6 +79,7 @@ private:
|
||||||
double editor_y_to_summary (double) const;
|
double editor_y_to_summary (double) const;
|
||||||
Position get_position (double, double) const;
|
Position get_position (double, double) const;
|
||||||
void set_cursor (Position);
|
void set_cursor (Position);
|
||||||
|
void route_gui_changed (std::string);
|
||||||
|
|
||||||
framepos_t _start; ///< start frame of the overview
|
framepos_t _start; ///< start frame of the overview
|
||||||
framepos_t _end; ///< end frame of the overview
|
framepos_t _end; ///< end frame of the overview
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue