curve/timeline: improved user interface behavior
* Implements "auto-fit" setting for curve view and sets it on open. * Improves scroll zooming on all TimelineViewBase derivatives. * Improves code sharing for better maintenance.
This commit is contained in:
@@ -482,12 +482,12 @@ void TimeBasedWidget::ToggleShowAll()
|
||||
w = timeline_views_.first()->width();
|
||||
}
|
||||
|
||||
w = w / 10 * 9;
|
||||
|
||||
|
||||
toggle_show_all_old_scale_ = GetScale();
|
||||
toggle_show_all_old_scroll_ = scrollbar_->value();
|
||||
|
||||
SetScale(w / GetConnectedNode()->GetLength().toDouble());
|
||||
SetScaleFromDimensions(w, GetConnectedNode()->GetLength().toDouble());
|
||||
scrollbar_->setValue(0);
|
||||
|
||||
// Must explicitly do this because SetScale() will automatically set this to false
|
||||
|
||||
Reference in New Issue
Block a user