Bug 457033 - Select all marks clean document as dirty
Summary: Select all marks clean document as dirty
Status: RESOLVED INTENTIONAL
Alias: None
Product: krita
Classification: Applications
Component: General (show other bugs)
Version: 5.0.8
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-07-22 22:02 UTC by Rajinder Yadav
Modified: 2022-07-23 02:10 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rajinder Yadav 2022-07-22 22:02:39 UTC
SUMMARY
***
NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols.
See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***

When I open a new image file to copy and paste into another tabbed view, the copied file is marked dirty. As a result when I close the tab I get an annoying popup dialog asking me if I was to save the file.

STEPS TO REPRODUCE
1. Open a image file
2. Press CTRL+A
3. Press CTRL+C
4. Press CTRL+W


OBSERVED RESULT

File is marked dirty when no changes have occured and dialog appear asking me if I want to save the file.

EXPECTED RESULT

File should close.

SOFTWARE/OS VERSIONS
Operating System: openSUSE Tumbleweed 20220719
KDE Plasma Version: 5.25.3
KDE Frameworks Version: 5.96.0
Qt Version: 5.15.5
Kernel Version: 5.18.11-1-default (64-bit)
Graphics Platform: X11
Processors: 24 × AMD Ryzen 9 5900X 12-Core Processor
Memory: 62.7 GiB of RAM
Graphics Processor: NVIDIA GeForce RTX 3080/PCIe/SSE2
Manufacturer: Micro-Star International Co., Ltd.
Product Name: MS-7A38
System Version: 8.0
Comment 1 wolthera 2022-07-22 22:09:24 UTC
Changes have occured: Krita stores the selection inside the file :)
Comment 2 Rajinder Yadav 2022-07-22 22:28:04 UTC
Why would selecting a image and also copying an image have to be stored in the current document. No other application has the behaviour.
These are no destructive operations and it should not mark a document dirty, this is a design flaw and imho a bug.

I can see this is getting saved to some undo buffer, but until a transformation operation is applied to the document. I should be able to close it with being asked to safe the file. As a result I am forced to do an addition mouse clicks or key press. The makes the under experience bad.
Comment 3 David REVOY 2022-07-22 22:43:29 UTC
Hi  Rajinder Yadav, it's not a design flaw. Imagine making a complex selection, like outlining manually a character in one of your illustration. It can be a lot of work. Then imagine the tab lost focus and user try to close Krita. Should Krita close without prompting to save the complex selection? Of course not... Also, selections are stored in Krita project files as Wolthera pointed (you can save them, then find them back later when you reload your file). It's all good reasons to mark the document as dirty as soon a selection is made.
Comment 4 Rajinder Yadav 2022-07-23 02:10:20 UTC
Hi David,

I had a feeling someone was going to say what you said haha.

I just realize I can drag and drop another image as a layer or from the menu layer -> import and do what I was doing opening multiple files and then copying them over.

Thanks for taking the time to explain what was going on and why!