Bug 440395 - Undoing a "Number" annotation does not decrease "Number Seed"
Summary: Undoing a "Number" annotation does not decrease "Number Seed"
Status: RESOLVED UPSTREAM
Alias: None
Product: Spectacle
Classification: Applications
Component: General (show other bugs)
Version: 21.04.3
Platform: Neon Linux
: NOR minor
Target Milestone: ---
Assignee: Boudhayan Gupta
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-07-29 20:36 UTC by Wing Hong Chan
Modified: 2021-07-29 21:27 UTC (History)
2 users (show)

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


Attachments
I add a Number annotation, use CTRL+Z to undo it, then add and undo more Number annotations. (411.07 KB, video/x-matroska)
2021-07-29 20:36 UTC, Wing Hong Chan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Wing Hong Chan 2021-07-29 20:36:19 UTC
Created attachment 140398 [details]
I add a Number annotation, use CTRL+Z to undo it, then add and undo more Number annotations.

SUMMARY
When I insert a Number annotation (the one that adds a circle with a number inside it) and undo it, the "Number Seed" (the number that will appear in the next Number annotation added) does not decrease. For example, if I insert a Number annotation 1, then undo it, then insert a new Number annotation, it will contain the number 2. 
Having it insert a Number with the same value as the Number that was undone would be useful to re-add the Number somewhere else.
The workaround for now is to decrease the Number Seed in the toolbar after undoing a Number annotation.

STEPS TO REPRODUCE
1. Open Spectacle
2. Take a New Screenshot (Click on "Take a New Screenshot", click and drag to select an area then press ENTER if necessary)
3. Click "Annotate" 
4. Click "Number" (icon that looks like the number 1 in a circle)
5. Click somewhere on the screenshot to add a Number annotation
6. Press CTRL+Z to undo adding the Number
7. Click somewhere on the screenshot to add a Number annotation

OBSERVED RESULT
The Number that is inserted after the undo is one greater than the Number inserted that was undone.

EXPECTED RESULT
The Number that is inserted after the undo should be the same as the one added before. 

SOFTWARE/OS VERSIONS
Windows: --
macOS: --
Linux/KDE Plasma: KDE Neon 5.22
(available in About System)
KDE Plasma Version: 5.22.4
KDE Frameworks Version: 5.84.0
Qt Version: 5.15.3

ADDITIONAL INFORMATION
Comment 1 Nicolas Fella 2021-07-29 21:27:40 UTC
Please report this to https://github.com/ksnip/kImageAnnotator/issues, that's the image editor we embed.

Thanks!