make sure clip markers in timeline refresh as soon as marker is edited

This commit is contained in:
Thomas Wilshaw
2021-10-26 00:37:53 +01:00
parent 82df680c52
commit 9eef02b446
3 changed files with 12 additions and 2 deletions
+7
View File
@@ -25,6 +25,8 @@
#include "common/qtutils.h"
#include "config/config.h"
#include "panel/panelmanager.h"
#include "panel/timeline/timeline.h"
#include "ui/colorcoding.h"
#include "widget/menu/menu.h"
#include "widget/menu/menushared.h"
@@ -114,6 +116,11 @@ void Marker::paintEvent(QPaintEvent *event)
} else {
resize(marker_width_, marker_height_);
}
TimelinePanel* timeline = PanelManager::instance()->MostRecentlyFocused<TimelinePanel>();
if (timeline) {
timeline->timeline_widget()->Refresh();
}
}
void Marker::mousePressEvent(QMouseEvent* e)
@@ -218,6 +218,11 @@ public:
*/
void SignalDeselectedAllBlocks();
void Refresh()
{
UpdateViewports();
}
MultiUndoCommand *TakeSubtitleSectionCommand()
{
// Copy pointer
@@ -637,8 +637,6 @@ void TimelineView::DrawClipMarker(QPainter* painter, double marker_x, qreal mark
int half_marker_height = marker_height / 3;
qDebug() << x << y;
QPoint points[] = {
QPoint(x, y),
QPoint(x - half_width, y - half_marker_height),