From 0969e2adc59a26240524da7d110fd3cec69444ab Mon Sep 17 00:00:00 2001 From: Mike Solar Date: Sun, 12 Jul 2026 17:20:41 +0800 Subject: [PATCH] Add diagnostics for proxy toggle synchronization Add temporary qDebug logging to Footage, ProjectCopier, RenderWorkerPool, and TimelineWidget to trace why Use Proxy cannot be toggled and why proxy footage may still be used after disabling. --- app/node/project/footage/footage.cpp | 13 +++++++++++++ app/node/project/footage/footage.h | 8 +------- app/render/projectcopier.cpp | 7 +++++++ app/render/renderworkerpool.cpp | 4 ++++ app/widget/timelinewidget/timelinewidget.cpp | 4 ++++ 5 files changed, 29 insertions(+), 7 deletions(-) diff --git a/app/node/project/footage/footage.cpp b/app/node/project/footage/footage.cpp index 6d447cade..c03805191 100644 --- a/app/node/project/footage/footage.cpp +++ b/app/node/project/footage/footage.cpp @@ -22,6 +22,7 @@ #include "footage.h" #include +#include #include #include @@ -229,12 +230,24 @@ void Footage::SetSourceStartTime(const rational &time, const QString &source) has_source_start_time_ = true; } +void Footage::set_proxy_enabled(bool enabled) +{ + if (proxy_enabled_ != enabled) { + qDebug() << "Footage::set_proxy_enabled:" << filename() << enabled; + proxy_enabled_ = enabled; + emit ProxySettingsChanged(); + } +} + void Footage::SetProxy(const QString &path, ProxyManager::ProxyState state, int video_stream_index, int preset_version, bool enabled) { + qDebug() << "Footage::SetProxy:" << filename() << "enabled=" << enabled + << "state=" << ProxyManager::ProxyStateToString(state) + << "path=" << path; proxy_path_ = path; proxy_state_ = state; proxy_video_stream_index_ = video_stream_index; diff --git a/app/node/project/footage/footage.h b/app/node/project/footage/footage.h index 13497aa1b..9e697135d 100644 --- a/app/node/project/footage/footage.h +++ b/app/node/project/footage/footage.h @@ -178,13 +178,7 @@ public: return proxy_enabled_; } - void set_proxy_enabled(bool enabled) - { - if (proxy_enabled_ != enabled) { - proxy_enabled_ = enabled; - emit ProxySettingsChanged(); - } - } + void set_proxy_enabled(bool enabled); const QString &proxy_path() const { diff --git a/app/render/projectcopier.cpp b/app/render/projectcopier.cpp index a17dff942..cc406cc6d 100644 --- a/app/render/projectcopier.cpp +++ b/app/render/projectcopier.cpp @@ -278,9 +278,16 @@ void ProjectCopier::SyncFootageProxySettings(Footage *source) { Footage *copy = GetCopy(source); if (!copy) { + qWarning() << "ProjectCopier::SyncFootageProxySettings: no copy for" + << source->filename(); return; } + qDebug() << "ProjectCopier::SyncFootageProxySettings:" << source->filename() + << "enabled=" << source->proxy_enabled() << "->" + << copy->proxy_enabled() << "state=" + << ProxyManager::ProxyStateToString(source->proxy_state()); + copy->SetProxy(source->proxy_path(), source->proxy_state(), source->proxy_video_stream_index(), source->proxy_preset_version(), source->proxy_enabled()); diff --git a/app/render/renderworkerpool.cpp b/app/render/renderworkerpool.cpp index b67ba2ad9..5e8ba6ab2 100644 --- a/app/render/renderworkerpool.cpp +++ b/app/render/renderworkerpool.cpp @@ -573,8 +573,12 @@ bool RenderWorkerPool::PrepareJob(RenderTicketPtr ticket, auto it = graph_cache_.find(project_uuid); if (it != graph_cache_.end() && !project->is_modified()) { graph_path = it->path; + qDebug() << "RenderWorkerPool::PrepareJob: using cached graph snapshot" + << graph_path; } else { if (it != graph_cache_.end()) { + qDebug() << "RenderWorkerPool::PrepareJob: graph stale, rewriting" + << project->is_modified(); CleanupGraphFile(it->path); graph_cache_.erase(it); } diff --git a/app/widget/timelinewidget/timelinewidget.cpp b/app/widget/timelinewidget/timelinewidget.cpp index 0313510a9..59a1bca1b 100644 --- a/app/widget/timelinewidget/timelinewidget.cpp +++ b/app/widget/timelinewidget/timelinewidget.cpp @@ -1216,8 +1216,12 @@ void TimelineWidget::GenerateProxiesForSelectedClips() void TimelineWidget::SetSelectedClipsProxyEnabled(bool enabled) { const QVector footage = GetSelectedProxyFootage(selected_blocks_); + qDebug() << "TimelineWidget::SetSelectedClipsProxyEnabled:" << enabled + << "footage count=" << footage.size(); for (Footage *item : footage) { if (item->proxy_path().isEmpty()) { + qDebug() << " skipping item with empty proxy path" + << item->filename(); continue; }