implemented vertical "zooming" in the TimelineWidget and CurveView
This comes in the form of changing the vertical scale in the CurveView and adjusting all track heights in the Timeline.
This commit is contained in:
@@ -473,6 +473,34 @@ void TimelineWidget::DeleteSelected()
|
||||
Core::instance()->undo_stack()->pushIfHasChildren(command);
|
||||
}
|
||||
|
||||
void TimelineWidget::IncreaseTrackHeight()
|
||||
{
|
||||
if (!timeline_node_) {
|
||||
return;
|
||||
}
|
||||
|
||||
QVector<TrackOutput*> all_tracks = timeline_node_->Tracks();
|
||||
|
||||
// Increase the height of each track by one "unit"
|
||||
foreach (TrackOutput* t, all_tracks) {
|
||||
t->SetTrackHeight(t->GetTrackHeight() + t->GetTrackHeightIncrement());
|
||||
}
|
||||
}
|
||||
|
||||
void TimelineWidget::DecreaseTrackHeight()
|
||||
{
|
||||
if (!timeline_node_) {
|
||||
return;
|
||||
}
|
||||
|
||||
QVector<TrackOutput*> all_tracks = timeline_node_->Tracks();
|
||||
|
||||
// Decrease the height of each track by one "unit"
|
||||
foreach (TrackOutput* t, all_tracks) {
|
||||
t->SetTrackHeight(qMax(t->GetTrackHeight() - t->GetTrackHeightIncrement(), t->GetTrackHeightMinimum()));
|
||||
}
|
||||
}
|
||||
|
||||
QList<TimelineViewBlockItem *> TimelineWidget::GetSelectedBlocks()
|
||||
{
|
||||
QList<TimelineViewBlockItem *> list;
|
||||
|
||||
Reference in New Issue
Block a user