Skip to content

Commit e7cb6ec

Browse files
committed
Change RAW toggle to temporary session-only state
Modified IDM_RENDER_RAW to only update g_runtime state instead of persisting to g_config. This ensures toolbar clicks only affect the current image session and respect system defaults on navigation or restart.
1 parent 8b09b1a commit e7cb6ec

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

QuickView/main.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6271,9 +6271,9 @@ LRESULT CALLBACK WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
62716271
break;
62726272

62736273
case IDM_RENDER_RAW: {
6274-
// Toggle Force RAW Decode (same as toolbar RawToggle)
6275-
g_config.ForceRawDecode = !g_config.ForceRawDecode;
6276-
g_runtime.ForceRawDecode = g_config.ForceRawDecode; // Sync runtime
6274+
// [Fix] Toggle Force RAW Decode TEMPORARILY (only for runtime)
6275+
// Clicking the toolbar button should NOT modify the global system setting (config).
6276+
g_runtime.ForceRawDecode = !g_runtime.ForceRawDecode;
62776277
g_toolbar.SetRawState(true, g_runtime.ForceRawDecode); // Update toolbar icon
62786278

62796279
if (!g_imagePath.empty()) {
@@ -6285,7 +6285,7 @@ LRESULT CALLBACK WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
62856285
LoadImageAsync(hwnd, g_imagePath.c_str());
62866286
}
62876287

6288-
std::wstring msg = g_config.ForceRawDecode ? L"RAW: Full Decode (High Quality)" : L"RAW: Embedded Preview (Fast)";
6288+
std::wstring msg = g_runtime.ForceRawDecode ? L"RAW: Full Decode (Temporary)" : L"RAW: Embedded Preview (Temporary)";
62896289
g_osd.Show(hwnd, msg, false);
62906290
RequestRepaint(PaintLayer::All);
62916291
break;

0 commit comments

Comments
 (0)