Bug 444112 - Creating new workspace from the window menu gives error - git 1913d80
Summary: Creating new workspace from the window menu gives error - git 1913d80
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Resource Management (show other bugs)
Version: nightly build (please specify the git hash!)
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Tiar
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2021-10-20 14:07 UTC by Raghavendra kamath
Modified: 2021-10-26 18:27 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Raghavendra kamath 2021-10-20 14:07:58 UTC
SUMMARY
When I try to create new workspace from the Window > workspace > new workspace menu, Krita shows an error message stating "Failed to add resources" Upong restart when I try to add the workspace again it say "The filename ".kws" is already in use, so adding a resource with name failed".

It seems that at first it creates a new file with the name .kws, which will be hidden due to the dot and then when we try to add the workspace again it will complain about the file being already present. it doesn't show a dialog to type in a name.

STEPS TO REPRODUCE
1. Open krita appimage nightly build
2. Go to window > workspace > New Workspace

This has been also reported on KA here - https://krita-artists.org/t/help-krita-improve-with-structured-beta-testing-of-the-new-resource-system-in-krita-5-0/28779/74
Comment 1 tomtomtomreportingin 2021-10-20 19:42:11 UTC
Yep, noticed this a couple days ago and haven't gotten around to reporting it. 

In Krita 4, creating a new workspace with the described method would open a new window for naming the workspace.

If that was intentionally removed, the problem is that Krita 5 doesn't properly handle resources created with characterless names (or names with only spaces/underscores), though perhaps that should be reported separately. In Krita 4, a fixed-length string of random characters would be generated if a resource was created without a name.
Comment 2 tomtomtomreportingin 2021-10-20 19:46:13 UTC
By the way, this issue does NOT occur in 5.0 beta 1, as the described method will create a new window for entering the name in that version. The issue starts occurring as of 5.0 beta 2.
Comment 3 Tiar 2021-10-22 12:59:38 UTC
Git commit 19c8ee284bc1d5497fd29da746e8347cff144cbc by Agata Cacko.
Committed on 22/10/2021 at 12:56.
Pushed by tymond into branch 'master'.

Fix broken adding a workspace from the main menu

Before this commit, there was no way to define a name for the new
workspace in Window -> Workspaces -> New Workspace..., so Krita
would always try to call it "" (empty string). This of course
always failed.
This commit fixes that by readding previously removed (by mistake)
QInputDialog asking for the name of the resource.

M  +6    -2    libs/ui/KisMainWindow.cpp

https://invent.kde.org/graphics/krita/commit/19c8ee284bc1d5497fd29da746e8347cff144cbc
Comment 4 Tiar 2021-10-26 18:27:27 UTC
Git commit 19f51d40557304f86916848393edfdfa94211df3 by Agata Cacko.
Committed on 26/10/2021 at 18:14.
Pushed by tymond into branch 'krita/5.0'.

Fix broken adding a workspace from the main menu

Before this commit, there was no way to define a name for the new
workspace in Window -> Workspaces -> New Workspace..., so Krita
would always try to call it "" (empty string). This of course
always failed.
This commit fixes that by readding previously removed (by mistake)
QInputDialog asking for the name of the resource.

M  +6    -2    libs/ui/KisMainWindow.cpp

https://invent.kde.org/graphics/krita/commit/19f51d40557304f86916848393edfdfa94211df3