app: migrate playhead/undo/modified events off EventBridge (issues 5-8)

- issue 5 (#53): ExportDialog playhead via PlaybackController
- issue 6 (#54): timebasedwidget/timelinewidget playhead via PlaybackController
- issue 7 (#55): historywidget via app-internal Core::undo_index_changed
- issue 8 (#33): PROJECT_MODIFIED_CHANGED re-broadcast as Core::project_modified_changed
This commit is contained in:
2026-08-05 00:52:37 +08:00
parent b77344b506
commit a030f2da20
13 changed files with 109 additions and 89 deletions
+6 -2
View File
@@ -24,6 +24,7 @@
#include "render/rendermanager.h"
#include "oakengine/app.h"
#include "oakengine/undo.h"
#include "playback/playbackcontroller.h"
#include "task/task.h"
#include "undo/undostack.h"
#include "widget/colorbutton/colorbutton.h"
@@ -744,7 +745,10 @@ TEST_F(MulticamWidgetTest, FutureSwitchWaitsForPlayheadToAdvance)
widget.set_multicam_node(reinterpret_cast<OakEngineNode *>(viewer_b), reinterpret_cast<OakEngineNode *>(node), reinterpret_cast<OakEngineBlock *>(clip), Rational(5));
EXPECT_EQ(widget.get_connected_node(), reinterpret_cast<OakEngineNode *>(viewer_a));
// Once playback time advances, the queued switch takes effect
viewer_a->set_playhead(Rational(1));
// Once playback time advances, the queued switch takes effect. The app
// drives the playhead through PlaybackController, which is what
// TimeBasedWidget now listens to (EventBridge elimination, issue 6).
PlaybackController::instance()->set_playhead(
reinterpret_cast<OakEngineNode *>(viewer_a), Rational(1));
EXPECT_EQ(widget.get_connected_node(), reinterpret_cast<OakEngineNode *>(viewer_b));
}