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

Noah Davis <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
      Latest Commit|                            |https://invent.kde.org/plas
                   |                            |ma/spectacle/-/commit/c6c39
                   |                            |e7753112a66e9109d1ab946a9ec
                   |                            |dcb9587c
            Version|                            |6.8.1
  Fixed/Implemented|                            |
                 In|                            |
             Status|ASSIGNED                    |RESOLVED

--- Comment #2 from Noah Davis <[email protected]> ---
Git commit c6c39e7753112a66e9109d1ab946a9ecdcb9587c by Noah Davis, on behalf of
Mohanraj Velayutham.
Committed on 19/10/2026 at 16:27.
Pushed by ndavis into branch 'master'.

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

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/c6c39e7753112a66e9109d1ab946a9ecdcb9587c

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

Reply via email to