Bug 341973 - Multiple 'local selections' are allowed but not possible.
Summary: Multiple 'local selections' are allowed but not possible.
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Layer Stack (show other bugs)
Version: 2.8.3
Platform: Microsoft Windows Microsoft Windows
: NOR wishlist
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-12-17 15:41 UTC by Joe
Modified: 2018-08-22 15:08 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Screenshot that show the buttons to toggle between selections. (133.64 KB, image/png)
2014-12-17 19:39 UTC, Sven Langkamp
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Joe 2014-12-17 15:41:27 UTC
On a layer, multiple 'local selections' can be created but the all refer to the same (last) selection area. It would seem that they should refer to the selection that was active when the the 'local selection' was created

Reproducible: Always

Steps to Reproduce:
1.Create a normal layer
2. Make a selection using a selection tool
3.Create a 'local selection' nested layer
4. Make another selection using the selection tool
5. Create another 'local selection' on the same normal layer
6. On the layer list, make the original selection the active one
7. It now refers to the last selection made. Original selection is gone. 


Expected Results:  
Ex: What should happen is if two selections are made, one and then it's inverse and two 'local selections' are created, one of each, and they are both 'on', the whole layer should be part of the selection. Disabling one would just disable that selection. Or, don't allow multiple 'local selections' on the same layer.
Comment 1 Sven Langkamp 2014-12-17 18:44:09 UTC
There can be multiple selection on a layer, but only one can be active. In the layer box there is is a small circle icons that can be clicked to switch the active selection.
Comment 2 Joe 2014-12-17 19:16:28 UTC
I know there is supposed to be but they cannot be different selections as far as I can see - this is the bug. Read carefully what I put in the bug report and try what I described there. 

-----Original Message-----
From: bugzilla_noreply@kde.org [mailto:bugzilla_noreply@kde.org] On Behalf Of Sven Langkamp
Sent: Wednesday, December 17, 2014 1:44 PM
To: josephb275@gmail.com
Subject: [krita] [Bug 341973] Multiple 'local selections' are allowed but not possible.

https://bugs.kde.org/show_bug.cgi?id=341973

Sven Langkamp <sven.langkamp@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |sven.langkamp@gmail.com

--- Comment #1 from Sven Langkamp <sven.langkamp@gmail.com> --- There can be multiple selection on a layer, but only one can be active. In the layer box there is is a small circle icons that can be clicked to switch the active selection.

--
You are receiving this mail because:
You reported the bug.
Comment 3 Sven Langkamp 2014-12-17 19:34:56 UTC
They can be different. I should note that "active" in the case doesn't mean selected in the layer box, but the small icon has to be selected.
Comment 4 Sven Langkamp 2014-12-17 19:39:03 UTC
Created attachment 90022 [details]
Screenshot that show the buttons to toggle between selections.
Comment 5 Halla Rempt 2014-12-18 10:23:10 UTC
Didn't we only add that after 2.8? Joe is still using the latest stable, 2.8.3 on Windows.
Comment 6 Joe 2014-12-18 15:12:13 UTC
Correct. When I use the small icon of a circle on the selection layer, I can only get one selection. Every time I make a second selection on a layer the last selection I made replaces all the previous selections. The graphics rendered in the layer look like everything is working as advertised (I see the same thing you have in your attachment)  but going back to the original selection and expecting it to be what I had originally set it to, I find that it has been replaced by the last selection I made.  In other words, I now have two local selection layers, both referring to the same (last) selection made. 

-----Original Message-----
From: bugzilla_noreply@kde.org [mailto:bugzilla_noreply@kde.org] On Behalf Of Sven Langkamp
Sent: Wednesday, December 17, 2014 2:35 PM
To: josephb275@gmail.com
Subject: [krita] [Bug 341973] Multiple 'local selections' are allowed but not possible.

https://bugs.kde.org/show_bug.cgi?id=341973

--- Comment #3 from Sven Langkamp <sven.langkamp@gmail.com> --- They can be different. I should note that "active" in the case doesn't mean selected in the layer box, but the small icon has to be selected.

--
You are receiving this mail because:
You reported the bug.
Comment 7 Joe 2014-12-18 16:01:39 UTC
I think I figured it out. When I make the first selection and make it a local selection, the default is that it remains selected after creation - the small circle on the layer has an outline. Then, I use the selection tool to create a second selection, this then replaces my original selection because that was still active (by default - little circle has an outline). I then create a second 'local selection'. I then have two layers having the same selection. 

When I manually deselect the first local selection layer (little circle click)  and then use the selection tool to define another selection and make it a layer, it works as it should. 

So, maybe a fix would be to create the local selection layer but not have it selected by default after creation? Or make the row select (when the entire row of the local selection layer is highlighted) the only time when the already defined selection area can be edited. In other words just selecting the small circle should not allow the selection area to be redefined (only on), rather the  selection layer row needs to be selected in order to change the definition of the selection.  

On another  note, the menu item: Select -> Deselect is not wired to local selection layer. The two operations are trying to control the same property but the menu does not deselect in the layer (remove outline from circle) as one would think it would. Deselect on the menu should be a global deselect. 

Using the latest Dec 14 release.

-----Original Message-----
From: bugzilla_noreply@kde.org [mailto:bugzilla_noreply@kde.org] On Behalf Of Sven Langkamp
Sent: Wednesday, December 17, 2014 2:35 PM
To: josephb275@gmail.com
Subject: [krita] [Bug 341973] Multiple 'local selections' are allowed but not possible.

https://bugs.kde.org/show_bug.cgi?id=341973

--- Comment #3 from Sven Langkamp <sven.langkamp@gmail.com> --- They can be different. I should note that "active" in the case doesn't mean selected in the layer box, but the small icon has to be selected.

--
You are receiving this mail because:
You reported the bug.
Comment 8 Dmitry Kazakov 2015-01-07 13:14:15 UTC
I guess the best solution here would be to fix two bugs:

1) Deselect should deselect local selection as well
2) If we create a local selection and it uses global selection as a source for copying, then the global selection should be deselected after the operation
Comment 9 Halla Rempt 2016-01-24 14:26:11 UTC
WISHGROUP: Small Usability Fixes
Comment 10 Dmitry Kazakov 2018-08-22 15:08:48 UTC
Git commit 40a489ee0b099124059e23b4f0462eb6b9135f8b by Dmitry Kazakov.
Committed on 22/08/2018 at 15:08.
Pushed by dkazakov into branch 'master'.

Previously Deselect and Reselect actions could be used only
for global selection. Now, if there is a local selection active,
they will activate/deactivate the selection mask.
CC:kimageshop@kde.org

M  +2    -0    libs/image/CMakeLists.txt
A  +65   -0    libs/image/commands/KisDeselectActiveSelectionCommand.cpp     [License: GPL (v2+)]
C  +17   -6    libs/image/commands/KisDeselectActiveSelectionCommand.h [from: libs/image/commands/kis_selection_commands.h - 056% similarity]
A  +83   -0    libs/image/commands/KisReselectActiveSelectionCommand.cpp     [License: GPL (v2+)]
C  +17   -6    libs/image/commands/KisReselectActiveSelectionCommand.h [from: libs/image/commands/kis_selection_commands.h - 059% similarity]
M  +1    -1    libs/image/commands/kis_deselect_global_selection_command.h
M  +1    -1    libs/image/commands/kis_reselect_global_selection_command.h
M  +2    -0    libs/image/commands/kis_selection_commands.h
M  +1    -0    libs/image/kis_selection.h
M  +2    -2    libs/ui/actions/kis_selection_action_factories.cpp

https://commits.kde.org/krita/40a489ee0b099124059e23b4f0462eb6b9135f8b
Comment 11 Dmitry Kazakov 2018-08-22 15:08:48 UTC
Git commit bc8416ffe05d822efe07ed2778b259a9ed96a43d by Dmitry Kazakov.
Committed on 22/08/2018 at 15:08.
Pushed by dkazakov into branch 'master'.

Deactivate global selection when creating a local selection from it

M  +18   -2    libs/ui/kis_mask_manager.cc

https://commits.kde.org/krita/bc8416ffe05d822efe07ed2778b259a9ed96a43d