diff options
author | Ben Loftis <ben@harrisonconsoles.com> | 2018-10-18 18:51:45 -0500 |
---|---|---|
committer | Ben Loftis <ben@harrisonconsoles.com> | 2019-08-01 12:11:31 -0500 |
commit | 375a09029535bd76afa0d76c74278a77805c9417 (patch) | |
tree | 2b5d29a13cb841b780dec28ed0e97cb2436b2ec5 /gtk2_ardour/editor_regions.cc | |
parent | b1019bbbf622cf2c12b76fca445ccd89c46c30c9 (diff) |
(Source List) Make clock change func more explicit.
Diffstat (limited to 'gtk2_ardour/editor_regions.cc')
-rw-r--r-- | gtk2_ardour/editor_regions.cc | 43 |
1 files changed, 21 insertions, 22 deletions
diff --git a/gtk2_ardour/editor_regions.cc b/gtk2_ardour/editor_regions.cc index 8515efbdcf..32e7a67b8c 100644 --- a/gtk2_ardour/editor_regions.cc +++ b/gtk2_ardour/editor_regions.cc @@ -1,5 +1,5 @@ /* - Copyright (C) 2000-2005 Paul Davis + Copyright (C) 2000-2018 Paul Davis This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -268,10 +268,7 @@ EditorRegions::EditorRegions (Editor* e) _display.signal_enter_notify_event().connect (sigc::mem_fun (*this, &EditorRegions::enter_notify), false); _display.signal_leave_notify_event().connect (sigc::mem_fun (*this, &EditorRegions::leave_notify), false); - // _display.signal_popup_menu().connect (sigc::bind (sigc::mem_fun (*this, &Editor::show__display_context_menu), 1, 0)); - - //ARDOUR_UI::instance()->secondary_clock.mode_changed.connect (sigc::mem_fun(*this, &Editor::redisplay_regions)); - ARDOUR_UI::instance()->primary_clock->mode_changed.connect (sigc::mem_fun(*this, &EditorRegions::update_all_rows)); + ARDOUR_UI::instance()->primary_clock->mode_changed.connect (sigc::mem_fun(*this, &EditorRegions::clock_format_changed)); e->EditorFreeze.connect (editor_freeze_connection, MISSING_INVALIDATOR, boost::bind (&EditorRegions::freeze_tree_model, this), gui_context()); e->EditorThaw.connect (editor_thaw_connection, MISSING_INVALIDATOR, boost::bind (&EditorRegions::thaw_tree_model, this), gui_context()); @@ -534,12 +531,20 @@ EditorRegions::update_row (boost::shared_ptr<Region> region) } void -EditorRegions::update_all_rows () +EditorRegions::clock_format_changed () { if (!_session) { return; } + PropertyChange change; + change.add (ARDOUR::Properties::start); + change.add (ARDOUR::Properties::length); + change.add (ARDOUR::Properties::position); + change.add (ARDOUR::Properties::sync_position); + change.add (ARDOUR::Properties::fade_in); + change.add (ARDOUR::Properties::fade_out); + RegionRowMap::iterator i; for (i = region_row_map.begin(); i != region_row_map.end(); ++i) { @@ -548,8 +553,7 @@ EditorRegions::update_all_rows () boost::shared_ptr<Region> region = (*j)[_columns.region]; - PropertyChange c; - populate_row(region, (*j), c); + populate_row(region, (*j), change); } } @@ -625,8 +629,8 @@ EditorRegions::format_position (samplepos_t pos, char* buf, size_t bufsize, bool void EditorRegions::populate_row (boost::shared_ptr<Region> region, TreeModel::Row const &row, PBD::PropertyChange const &what_changed) { - //the grid is most interested in the regions that are *visible* in the editor. this is a perfect place to flag changes to the grid cache - //maybe update the grid here + //the grid is most interested in the regions that are *visible* in the editor. + //this is a convenient place to flag changes to the grid cache, on a visible region PropertyChange grid_interests; grid_interests.add (ARDOUR::Properties::position); grid_interests.add (ARDOUR::Properties::length); @@ -635,19 +639,14 @@ EditorRegions::populate_row (boost::shared_ptr<Region> region, TreeModel::Row co _editor->mark_region_boundary_cache_dirty(); } - //note: do this in populate_row - { - Gdk::Color c; - bool missing_source = boost::dynamic_pointer_cast<SilentFileSource>(region->source()) != NULL; - if (missing_source) { - // c.set_rgb(65535,0,0); // FIXME: error color from style - set_color_from_rgba (c, UIConfiguration::instance().color ("region list missing source")); - } else { - set_color_from_rgba (c, UIConfiguration::instance().color ("region list whole file")); - } - - row[_columns.color_] = c; + Gdk::Color c; + bool missing_source = boost::dynamic_pointer_cast<SilentFileSource>(region->source()) != NULL; + if (missing_source) { + set_color_from_rgba (c, UIConfiguration::instance().color ("region list missing source")); + } else { + set_color_from_rgba (c, UIConfiguration::instance().color ("region list whole file")); } + row[_columns.color_] = c; boost::shared_ptr<AudioRegion> audioregion = boost::dynamic_pointer_cast<AudioRegion>(region); |