Bug 428543

Summary: "Copy image to clipboard" conflicts with "Autosave the image to the default location"
Product: [Applications] Spectacle Reporter: toluschr
Component: GeneralAssignee: Boudhayan Gupta <me>
Status: RESOLVED FIXED    
Severity: normal CC: antonio.prcela, justin.zobel, kde, med.medin.2014, nate, yoavnavott
Priority: NOR    
Version: 20.08.2   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In: 20.12
Sentry Crash Report:

Description toluschr 2020-11-01 08:33:13 UTC
SUMMARY
Both, "Copy image to clipboard" and "Autosave the image to the default location" options are checkboxes, not radio buttons, so the user would assume, selecting both would copy _and_ save the screenshot. Enabling "Copy image to clipboard" results in the image not being saved.

STEPS TO REPRODUCE
1. Open spectacle
2. Navigate to settings
3. Enable "Copy image to clipboard" and "Autosave the image to the default location"
4. Completely close spectacle (`killall spectacle`)
5. Take a screenshot using the hotkey (Ex. Super+Shift+Print)
6. Notice that the screenshot was copied, but not saved.

OBSERVED RESULT
Enabling "Copy image to clipboard" results in the image not being saved.

EXPECTED RESULT
Selecting both options copies _and_ saves the screenshot.

SOFTWARE/OS VERSIONS
Operating System: void
KDE Plasma Version: 5.20.2
KDE Frameworks Version: 5.75.0
Qt Version: 5.15.1

PROPOSED SOLUTION
I'd prefer the options to both copy and save. If doing both isn't possible, changing the widgets to be radio buttons would be appropriate.
Comment 1 Justin Zobel 2020-11-02 00:14:05 UTC
I can't confirm this issue in KDE Neon Unstable Edition. I get the file in my ~/Pictures folder and it is on the clipboard for pasting into applications.

Are you able to confirm the settings saved in ~/.config/spectaclerc
[General]
autoSaveImage=true
copyImageToClipboard=true
Comment 2 toluschr 2020-11-02 08:22:18 UTC
(In reply to Justin Zobel from comment #1)
> I can't confirm this issue in KDE Neon Unstable Edition. I get the file in
> my ~/Pictures folder and it is on the clipboard for pasting into
> applications.
> 
> Are you able to confirm the settings saved in ~/.config/spectaclerc
> [General]
> autoSaveImage=true
> copyImageToClipboard=true

My spectaclerc:

[$Version]
update_info=spectacle_newConfig.upd:spectacle-new-config

[FileDialogSize]
DP-0 HDMI-0 Height 1080=598
DP-0 HDMI-0 Width 1920=980

[General]
autoSaveImage=true
copyImageToClipboard=true
rememberLastRectangularRegion=false
showMagnifier=true

[GuiConfig]
captureDelay=2
cropRegion=4671,333,225,166
window-position=4382,450

[KFileDialog Settings]
Recent URLs[$e]=file:$HOME/Pictures/
iconViewIconSize=43

[Save]
copySaveLocation=false
defaultSaveLocation=file:///mnt/data/Images/Screenshots/
saveFilenameFormat=%Y/%M/%D/%H:%m:%S-%T
Comment 3 toluschr 2020-11-02 08:25:04 UTC
(In reply to Justin Zobel from comment #1)
> I can't confirm this issue in KDE Neon Unstable Edition. I get the file in
> my ~/Pictures folder and it is on the clipboard for pasting into
> applications.
> 
> Are you able to confirm the settings saved in ~/.config/spectaclerc
> [General]
> autoSaveImage=true
> copyImageToClipboard=true

Make sure to have completely closed spectacle. Aparently, the issue doesn't occur if the gui is open.
Comment 4 Justin Zobel 2020-11-02 08:45:13 UTC
(In reply to toluschr from comment #3)
> (In reply to Justin Zobel from comment #1)
> > I can't confirm this issue in KDE Neon Unstable Edition. I get the file in
> > my ~/Pictures folder and it is on the clipboard for pasting into
> > applications.
> > 
> > Are you able to confirm the settings saved in ~/.config/spectaclerc
> > [General]
> > autoSaveImage=true
> > copyImageToClipboard=true
> 
> Make sure to have completely closed spectacle. Aparently, the issue doesn't
> occur if the gui is open.

I've even rebooted a few times since then but my Shift + Meta + Print Screen gives me clipboard and a saved file, odd one.

Moving back to REPORTED to see if others can reproduce.
Comment 5 Justin Zobel 2020-11-04 01:48:51 UTC
*** Bug 428667 has been marked as a duplicate of this bug. ***
Comment 6 Antonio Prcela 2020-11-06 07:37:22 UTC
Fixed with this MR, which is already merged:
https://invent.kde.org/graphics/spectacle/-/merge_requests/2

I', not sure which Spectacle version will get this MR tho.
Comment 7 Nate Graham 2020-11-06 18:23:24 UTC
*** Bug 428752 has been marked as a duplicate of this bug. ***