Bug 422148 - Respects settings only when the spectacle window is opened
Summary: Respects settings only when the spectacle window is opened
Status: RESOLVED FIXED
Alias: None
Product: Spectacle
Classification: Applications
Component: General (show other bugs)
Version: 20.04.0
Platform: Manjaro Linux
: NOR normal
Target Milestone: ---
Assignee: Boudhayan Gupta
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-05-27 20:13 UTC by Fabian.dudda
Modified: 2020-10-06 19:04 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 20.12
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Fabian.dudda 2020-05-27 20:13:34 UTC
STEPS TO REPRODUCE
1. Settings: Save to clipboard/don't save into location
2. Crop screenshot when spectacle window is open -> works as expected
3. Crop screenshot when spectacle window is closed -> saves into location with only the link to the picture in the clipboard

OBSERVED RESULT
Saves into location and puts link into clipboard

EXPECTED RESULT
Don't save into location and put the picture into the clipboard as described in the settings

SOFTWARE/OS VERSIONS
Windows: -
macOS: -
Linux/KDE Plasma: Manjaro Linux 
KDE-Plasma-Version: 5.18.5
KDE-Frameworks-Version: 5.70.0
Qt-Version: 5.14.2
Kernel-Version: 5.6.12-1-MANJARO
Comment 1 Antonio Prcela 2020-06-07 21:13:59 UTC
Hi, thanks for he report.
But I'm not quite sure what you mean with "Crop screenshot". Do you mean "take a screenshot" or literally cropping an image?

Sorry for me not understanding this properly, I'd like to help but first I need to understand the question :)
Comment 2 Fabian.dudda 2020-06-08 23:01:37 UTC
(In reply to Antonio from comment #1)
> Hi, thanks for he report.
> But I'm not quite sure what you mean with "Crop screenshot". Do you mean
> "take a screenshot" or literally cropping an image?
> 
> Sorry for me not understanding this properly, I'd like to help but first I
> need to understand the question :)

Sorry for the misunderstanding, english is not my first language. The problem occurs, when I try to use the "Capture rectangular region" function. On Manjaro the standard shortcut for this is Meta+shift+Print hope this helps :)
Comment 3 Antonio Prcela 2020-06-09 18:01:42 UTC
(In reply to Fabian.dudda from comment #2)
> (In reply to Antonio from comment #1)
> > Hi, thanks for he report.
> > But I'm not quite sure what you mean with "Crop screenshot". Do you mean
> > "take a screenshot" or literally cropping an image?
> > 
> > Sorry for me not understanding this properly, I'd like to help but first I
> > need to understand the question :)
> 
> Sorry for the misunderstanding, english is not my first language. The
> problem occurs, when I try to use the "Capture rectangular region" function.
> On Manjaro the standard shortcut for this is Meta+shift+Print hope this
> helps :)

Got it now and can reproduce it. Settings also set to: Save to clipboard, don't autosave.
When you do a rectangular screenshot while Spectacle is running, it works as expected.
Whereas when you launch the rectangular screenshot via the shortcut "Meta+shift+Print", it saves the image to the default location, not into the clipboard.

I tested it with this commit which awaits approval: https://invent.kde.org/graphics/spectacle/-/merge_requests/2

And this one fixes is! :)

I'll hope that it will land soon on master.
Comment 4 Antonio Prcela 2020-10-05 19:35:53 UTC
Fix moved over to a new MR:

https://invent.kde.org/graphics/spectacle/-/merge_requests/24
Comment 5 Antonio Prcela 2020-10-06 19:04:19 UTC
Git commit 1e7b22b8c60575d4a12c267db818f8a15f17d500 by Antonio Prcela.
Committed on 06/10/2020 at 18:30.
Pushed by ngraham into branch 'master'.

Respect settings and cli parameters

Separate 'if' for doCopyToClipboard() and doSave(), since one can have both active. Adjusted the corresponding notifications.
Related: bug 425573

M  +14   -6    src/SpectacleCore.cpp
M  +1    -0    src/SpectacleCore.h

https://invent.kde.org/graphics/spectacle/commit/1e7b22b8c60575d4a12c267db818f8a15f17d500