From c226bf25372a9c5f16c2e73c0d92e8909fb21dda Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gonzalo=20Garramu=C3=B1o?= Date: Mon, 23 Oct 2023 14:18:44 -0300 Subject: [PATCH] Update playback buttons color. --- mrv2/docs/HISTORY.md | 1 + mrv2/lib/mrvApp/mrvMainControl.cpp | 1 + mrv2/lib/mrvGL/mrvTimelineViewport.cpp | 13 +++++++++++-- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/mrv2/docs/HISTORY.md b/mrv2/docs/HISTORY.md index c235483d2..a8a8cdd74 100644 --- a/mrv2/docs/HISTORY.md +++ b/mrv2/docs/HISTORY.md @@ -38,6 +38,7 @@ v0.8.2 - Fixed sequence detection when the sequence would reach the number of padded digits. - Fixed Auto Playback working only for the first clip loaded. +- Fixed playback buttons when switching clips not showing playback. v0.8.1 diff --git a/mrv2/lib/mrvApp/mrvMainControl.cpp b/mrv2/lib/mrvApp/mrvMainControl.cpp index 1dcaf7ad7..01a4bf5f8 100644 --- a/mrv2/lib/mrvApp/mrvMainControl.cpp +++ b/mrv2/lib/mrvApp/mrvMainControl.cpp @@ -373,6 +373,7 @@ namespace mrv view->setCompareOptions(p.compareOptions); view->setStereo3DOptions(p.stereo3DOptions); view->setTimelinePlayers(p.timelinePlayers); + view->updatePlaybackButtons(); view->redraw(); p.ui->uiTimeline->setColorConfigOptions(p.colorConfigOptions); diff --git a/mrv2/lib/mrvGL/mrvTimelineViewport.cpp b/mrv2/lib/mrvGL/mrvTimelineViewport.cpp index a69ba818e..5155febd5 100644 --- a/mrv2/lib/mrvGL/mrvTimelineViewport.cpp +++ b/mrv2/lib/mrvGL/mrvTimelineViewport.cpp @@ -312,11 +312,20 @@ namespace mrv void TimelineViewport::updatePlaybackButtons() const noexcept { TLRENDER_P(); - if (p.timelinePlayers.empty()) - return; TimelineClass* c = p.ui->uiTimeWindow; + if (p.timelinePlayers.empty()) + { + c->uiPlayForwards->color(FL_BACKGROUND_COLOR); + c->uiPlayBackwards->color(FL_BACKGROUND_COLOR); + c->uiStop->color(FL_BACKGROUND_COLOR); + c->uiPlayForwards->redraw(); + c->uiPlayBackwards->redraw(); + c->uiStop->redraw(); + return; + } + c->uiPlayForwards->color(FL_BACKGROUND_COLOR); c->uiPlayBackwards->color(FL_BACKGROUND_COLOR); c->uiStop->color(FL_BACKGROUND_COLOR);