ensure that non-drag track height changes cause a call to Editor::redisplay_track_views()
This commit is contained in:
parent
d01ad0b4d4
commit
a3c5db5d51
|
@ -529,13 +529,13 @@ AutomationTimeAxisView::clear_clicked ()
|
|||
}
|
||||
|
||||
void
|
||||
AutomationTimeAxisView::set_height (uint32_t h, TrackHeightMode m)
|
||||
AutomationTimeAxisView::set_height (uint32_t h, TrackHeightMode m, bool from_idle)
|
||||
{
|
||||
bool const changed = (height != (uint32_t) h) || first_call_to_set_height;
|
||||
uint32_t const normal = preset_height (HeightNormal);
|
||||
bool const changed_between_small_and_normal = ( (height < normal && h >= normal) || (height >= normal || h < normal) );
|
||||
|
||||
TimeAxisView::set_height (h, m);
|
||||
TimeAxisView::set_height (h, m, from_idle);
|
||||
|
||||
_base_rect->set_y1 (h);
|
||||
|
||||
|
|
|
@ -78,7 +78,7 @@ public:
|
|||
|
||||
~AutomationTimeAxisView();
|
||||
|
||||
virtual void set_height (uint32_t, TrackHeightMode m = OnlySelf);
|
||||
virtual void set_height (uint32_t, TrackHeightMode m = OnlySelf, bool from_idle = false);
|
||||
void set_samples_per_pixel (double);
|
||||
std::string name() const { return _name; }
|
||||
Gdk::Color color () const;
|
||||
|
|
|
@ -7929,6 +7929,12 @@ Editor::set_track_height (Height h)
|
|||
for (TrackSelection::iterator x = ts.begin(); x != ts.end(); ++x) {
|
||||
(*x)->set_height_enum (h);
|
||||
}
|
||||
|
||||
/* when not setting height from a drag, nothing will cause a redisplay
|
||||
of the non-altered tracks. Do that explicitly.
|
||||
*/
|
||||
|
||||
queue_redisplay_track_views ();
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -571,7 +571,7 @@ MidiTimeAxisView::update_midi_controls_visibility (uint32_t h)
|
|||
}
|
||||
|
||||
void
|
||||
MidiTimeAxisView::set_height (uint32_t h, TrackHeightMode m)
|
||||
MidiTimeAxisView::set_height (uint32_t h, TrackHeightMode m, bool from_idle)
|
||||
{
|
||||
update_midi_controls_visibility (h);
|
||||
|
||||
|
@ -588,7 +588,7 @@ MidiTimeAxisView::set_height (uint32_t h, TrackHeightMode m)
|
|||
* which needs to know if we have just shown or hidden a scroomer /
|
||||
* piano roll.
|
||||
*/
|
||||
RouteTimeAxisView::set_height (h, m);
|
||||
RouteTimeAxisView::set_height (h, m, from_idle);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -85,7 +85,7 @@ public:
|
|||
|
||||
MidiStreamView* midi_view();
|
||||
|
||||
void set_height (uint32_t, TrackHeightMode m = OnlySelf);
|
||||
void set_height (uint32_t, TrackHeightMode m = OnlySelf, bool from_idle = false);
|
||||
void set_layer_display (LayerDisplay d);
|
||||
|
||||
boost::shared_ptr<ARDOUR::MidiRegion> add_region (Temporal::timepos_t const &, Temporal::timecnt_t const &, bool);
|
||||
|
|
|
@ -550,6 +550,8 @@ public:
|
|||
|
||||
virtual bool should_ripple () const = 0;
|
||||
|
||||
virtual void queue_redisplay_track_views () = 0;
|
||||
|
||||
/// Singleton instance, set up by Editor::Editor()
|
||||
|
||||
static PublicEditor* _instance;
|
||||
|
|
|
@ -959,7 +959,7 @@ RouteTimeAxisView::show_selection (TimeSelection& ts)
|
|||
}
|
||||
|
||||
void
|
||||
RouteTimeAxisView::set_height (uint32_t h, TrackHeightMode m)
|
||||
RouteTimeAxisView::set_height (uint32_t h, TrackHeightMode m, bool from_idle)
|
||||
{
|
||||
int gmlen = h - 9;
|
||||
bool height_changed = (height == 0) || (h != height);
|
||||
|
@ -970,7 +970,7 @@ RouteTimeAxisView::set_height (uint32_t h, TrackHeightMode m)
|
|||
}
|
||||
gm.get_level_meter().setup_meters (gmlen, meter_width);
|
||||
|
||||
TimeAxisView::set_height (h, m);
|
||||
TimeAxisView::set_height (h, m, from_idle);
|
||||
|
||||
if (_view) {
|
||||
_view->set_height ((double) current_height());
|
||||
|
|
|
@ -94,7 +94,7 @@ public:
|
|||
void set_button_names ();
|
||||
|
||||
void set_samples_per_pixel (double);
|
||||
void set_height (uint32_t h, TrackHeightMode m = OnlySelf);
|
||||
void set_height (uint32_t h, TrackHeightMode m = OnlySelf, bool from_idle = false);
|
||||
void show_timestretch (Temporal::timepos_t const & start, Temporal::timepos_t const & end, int layers, int layer);
|
||||
void hide_timestretch ();
|
||||
void selection_click (GdkEventButton*);
|
||||
|
|
|
@ -446,10 +446,9 @@ TimeAxisView::controls_ebox_button_press (GdkEventButton* event)
|
|||
void
|
||||
TimeAxisView::idle_resize (int32_t h)
|
||||
{
|
||||
set_height (std::max(0, h));
|
||||
set_height (std::max(0, h), OnlySelf, true);
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
TimeAxisView::controls_ebox_motion (GdkEventMotion* ev)
|
||||
{
|
||||
|
@ -600,7 +599,7 @@ TimeAxisView::set_height_enum (Height h, bool apply_to_selection)
|
|||
}
|
||||
|
||||
void
|
||||
TimeAxisView::set_height (uint32_t h, TrackHeightMode m)
|
||||
TimeAxisView::set_height (uint32_t h, TrackHeightMode m, bool from_idle)
|
||||
{
|
||||
uint32_t lanes = 0;
|
||||
if (m == TotalHeight) {
|
||||
|
@ -637,6 +636,10 @@ TimeAxisView::set_height (uint32_t h, TrackHeightMode m)
|
|||
}
|
||||
|
||||
_editor.override_visible_track_count ();
|
||||
|
||||
if (!from_idle) {
|
||||
_editor.queue_redisplay_track_views ();
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -159,7 +159,7 @@ public:
|
|||
HeightPerLane
|
||||
};
|
||||
|
||||
virtual void set_height (uint32_t h, TrackHeightMode m = OnlySelf);
|
||||
virtual void set_height (uint32_t h, TrackHeightMode m = OnlySelf, bool from_idle = false);
|
||||
void set_height_enum (Height, bool apply_to_selection = false);
|
||||
void reset_height();
|
||||
|
||||
|
|
|
@ -354,9 +354,10 @@ VCATimeAxisView::color () const
|
|||
}
|
||||
|
||||
void
|
||||
VCATimeAxisView::set_height (uint32_t h, TrackHeightMode m)
|
||||
VCATimeAxisView::set_height (uint32_t h, TrackHeightMode m, bool from_idle)
|
||||
{
|
||||
TimeAxisView::set_height (h, m);
|
||||
TimeAxisView::set_height (h, m, from_idle);
|
||||
|
||||
if (height >= preset_height (HeightNormal)) {
|
||||
drop_button.show ();
|
||||
automation_button.show ();
|
||||
|
|
|
@ -51,7 +51,7 @@ public:
|
|||
Gdk::Color color () const;
|
||||
std::string state_id() const;
|
||||
|
||||
void set_height (uint32_t h, TrackHeightMode m = OnlySelf);
|
||||
void set_height (uint32_t h, TrackHeightMode m = OnlySelf, bool from_idle = false);
|
||||
|
||||
bool marked_for_display () const;
|
||||
bool set_marked_for_display (bool);
|
||||
|
|
Loading…
Reference in New Issue