Add basic marker deleting and fix selection code

This commit is contained in:
Thomas Wilshaw
2021-10-22 22:15:52 +01:00
parent 0044174f3d
commit c445dc46a9
6 changed files with 31 additions and 14 deletions
+8 -3
View File
@@ -47,6 +47,14 @@ void Marker::SetActive(bool active)
{
active_ = active;
// Feels very hacky, might it be better to write some access methods?
if (active) {
TimelineWidget *timeline = dynamic_cast<TimelineWidget *>(parent()->parent());
if (timeline) {
static_cast<TimelineWidget *>(parent()->parent())->DeselectAll();
}
}
update();
}
@@ -109,9 +117,6 @@ void Marker::mousePressEvent(QMouseEvent* e)
update();
}
// Feels very hacky, might it be better to write some access methods?
static_cast<TimelineWidget *>(parent()->parent())->DeselectAll();
}
void Marker::ShowContextMenu() {