https://bugs.kde.org/show_bug.cgi?id=526111

Noah Davis <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Latest Commit|https://invent.kde.org/plas |https://invent.kde.org/plas
                   |ma/spectacle/-/commit/c6c39 |ma/spectacle/-/commit/61f92
                   |e7753112a66e9109d1ab946a9ec |b9c4ffdea80b22df94005620f96
                   |dcb9587c                    |0fdc0877

--- Comment #3 from Noah Davis <[email protected]> ---
Git commit 61f92b9c4ffdea80b22df94005620f960fdc0877 by Noah Davis.
Committed on 19/10/2026 at 16:28.
Pushed by ndavis into branch 'Plasma/6.8'.

SpectacleCore: update current saved image URL so Save overwrites file after
Save As

## Summary

After saving a screenshot using "Save As..." or "Save", subsequent clicks on
"Save" (or pressing Ctrl+S) would save into the default screenshot directory
with a newly generated timestamp instead of overwriting the file that was just
saved.

## Root Cause

`SpectacleWindow::save()` calls `ExportManager::exportImage(Save,
SpectacleCore::instance()->outputUrl())`. However, `m_editExistingUrl` was
never set when saving completed, leaving `outputUrl()` empty. When
`exportImage()` received an empty URL, it fell back to `getAutosaveFilename()`,
creating a new timestamped file in the default directory.

## Solution

- Update `m_editExistingUrl` to `url` in `SpectacleCore::onImageExported` when
`actions & AnySave`, and clear `m_outputUrl`.
- Clear `m_editExistingUrl` whenever a new screenshot capture starts so fresh
captures do not overwrite previous images.
- Pass `outputUrl()` in `SpectacleWindow::saveAs()` and pre-fill the dialog
with the existing filename when available.

FIXED-IN: 6.8.1


(cherry picked from commit c6c39e7753112a66e9109d1ab946a9ecdcb9587c)

15f6f337 SpectacleCore: update current saved image URL so Save overwrites file
after Save As

Co-authored-by: Mohanraj Velayutham <[email protected]>

M  +4    -1    src/ExportManager.cpp
M  +2    -1    src/Gui/SpectacleWindow.cpp
M  +12   -6    src/SpectacleCore.cpp

https://invent.kde.org/plasma/spectacle/-/commit/61f92b9c4ffdea80b22df94005620f960fdc0877

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to