timeline: hide snap points if the tool changes

This commit is contained in:
itsmattkc
2020-10-03 23:10:10 +10:00
parent 90199b7b57
commit dfe7b80bf3
2 changed files with 9 additions and 0 deletions
@@ -162,6 +162,8 @@ TimelineWidget::TimelineWidget(QWidget *parent) :
SetMaximumScale(TimelineViewBase::kMaximumScale);
SetAutoSetTimebase(false);
connect(Core::instance(), &Core::ToolChanged, this, &TimelineWidget::ToolChanged);
}
TimelineWidget::~TimelineWidget()
@@ -1165,6 +1167,11 @@ void TimelineWidget::ViewTimestampChanged(int64_t ts)
emit TimeChanged(ts);
}
void TimelineWidget::ToolChanged()
{
HideSnaps();
}
void TimelineWidget::AddGhost(TimelineViewGhostItem *ghost)
{
ghost_items_.append(ghost);