Locked layers not completely locked.

Bug #181493 reported by Martin Andersen
22
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
Medium
frenchie4111

Bug Description

When you lock a layer, anything selected on it should be unselected.
Also, you should not be able to move anything via Shift-Page Down to it.
Locked should mean locked.

Changed in inkscape:
importance: Undecided → Medium
status: New → Confirmed
su_v (suv-lp)
tags: added: layers
Revision history for this message
jazzynico (jazzynico) wrote :

Apparently occurs when something is selected before the layer is locked (didn't manage to select or change anything in a locked layer with no selection).
Thus unselecting everything on the canvas when locking should fix it.

Changed in inkscape:
status: Confirmed → Triaged
Revision history for this message
jazzynico (jazzynico) wrote :

Correction: unselecting everything in the layer...

su_v (suv-lp)
tags: added: easy-fix
Revision history for this message
frenchie4111 (mdl0394) wrote :

I am looking into it right now

Changed in inkscape:
assignee: nobody → frenchie4111 (mdl0394)
Revision history for this message
frenchie4111 (mdl0394) wrote : Re: [Bug 181493] Re: Locked layers not completely locked.

For this, should it deselect everything when you lock a layer, or just the
things on the locked layer?

On Sun, Mar 31, 2013 at 12:37 PM, frenchie4111 <email address hidden>wrote:

> I am looking into it right now
>
> ** Changed in: inkscape
> Assignee: (unassigned) => frenchie4111 (mdl0394)
>
> --
> You received this bug notification because you are a bug assignee.
> https://bugs.launchpad.net/bugs/181493
>
> Title:
> Locked layers not completely locked.
>
> Status in Inkscape: A Vector Drawing Tool:
> Triaged
>
> Bug description:
> When you lock a layer, anything selected on it should be unselected.
> Also, you should not be able to move anything via Shift-Page Down to it.
> Locked should mean locked.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/inkscape/+bug/181493/+subscriptions
>

--
Mike Lyons - frenchie4111
Software Engineering Student at Rochester Institute of Technology
<email address hidden>
<email address hidden>

Revision history for this message
frenchie4111 (mdl0394) wrote :

You can also modify objects after hiding them, I am going to fix that bug at the same time.

Revision history for this message
frenchie4111 (mdl0394) wrote :

Simply deselects everything when you lock/hide a layer. I decided to deselect everything because this is the same that is done when a different layer is selected and it seemed they should function the same.

Revision history for this message
jazzynico (jazzynico) wrote :

Looks good on Windows XP (I'll test again on Debian testing later).

> should it deselect everything when you lock a layer, or just the
> things on the locked layer?

I'd rather deselect the locked layer's objects, but it's not a strong opinion.

Changed in inkscape:
status: Triaged → In Progress
Revision history for this message
jazzynico (jazzynico) wrote :

Also tested on Debian testing. One thing that is very inconvenient is that the user is sent to the root element of the SVG document. Even if the patch deselect everything, it should stay in the current layer (an hidden or locked layer is still selectable) so that you never draw objects in root directly.

Revision history for this message
frenchie4111 (mdl0394) wrote :

That's not good. I will look into it
On Apr 4, 2013 2:30 AM, "JazzyNico" <email address hidden> wrote:

> Also tested on Debian testing. One thing that is very inconvenient is
> that the user is sent to the root element of the SVG document. Even if
> the patch deselect everything, it should stay in the current layer (an
> hidden or locked layer is still selectable) so that you never draw
> objects in root directly.
>
> --
> You received this bug notification because you are a bug assignee.
> https://bugs.launchpad.net/bugs/181493
>
> Title:
> Locked layers not completely locked.
>
> Status in Inkscape: A Vector Drawing Tool:
> In Progress
>
> Bug description:
> When you lock a layer, anything selected on it should be unselected.
> Also, you should not be able to move anything via Shift-Page Down to it.
> Locked should mean locked.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/inkscape/+bug/181493/+subscriptions
>

Revision history for this message
frenchie4111 (mdl0394) wrote :

This patch fixes what you said JazzyNico. Though this still deselects everything. I am currently working on one that will only deselect the current layer.

Revision history for this message
frenchie4111 (mdl0394) wrote :

This patch causes locking/hiding a layer to only deselect the objects in that layer.

I added a SelectionHelper method called fixSelection() which fixes the current selection, removing any hidden or locked objects from it.

Revision history for this message
jazzynico (jazzynico) wrote :

Tested successfully on Windows XP, Inkscape 12272.
I'll confirm later with Debian testing.

Thanks for the patch!

Changed in inkscape:
milestone: none → 0.49
Revision history for this message
su_v (suv-lp) wrote :

<opinion>
I'm not sure whether to unconditionally deselect objects when _hiding_ a layer is a good idea (and in the scope of this specific bug report): personally, I often toggle the visibility of one (or more) layer off/on to temporarily view/hide details of a drawing, while likely not wanting to loose a current (possibly complex) selection because I'm likely to resume the current drawing task after having toggled the visibility of layer(s) temporarily.
</opinion>

Revision history for this message
frenchie4111 (mdl0394) wrote :

It should be very easy to only make it deselect locked objects if that is
the way that you want it to be. I don't care either way.

On Tue, Apr 9, 2013 at 12:48 PM, ~suv <email address hidden> wrote:

> <opinion>
> I'm not sure whether to unconditionally deselect objects when _hiding_ a
> layer is a good idea (and in the scope of this specific bug report):
> personally, I often toggle the visibility of one (or more) layer off/on to
> temporarily view/hide details of a drawing, while likely not wanting to
> loose a current (possibly complex) selection because I'm likely to resume
> the current drawing task after having toggled the visibility of layer(s)
> temporarily.
> </opinion>
>
> --
> You received this bug notification because you are a bug assignee.
> https://bugs.launchpad.net/bugs/181493
>
> Title:
> Locked layers not completely locked.
>
> Status in Inkscape: A Vector Drawing Tool:
> In Progress
>
> Bug description:
> When you lock a layer, anything selected on it should be unselected.
> Also, you should not be able to move anything via Shift-Page Down to it.
> Locked should mean locked.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/inkscape/+bug/181493/+subscriptions
>

--
Mike Lyons - frenchie4111
Software Engineering Student at Rochester Institute of Technology
<email address hidden>
<email address hidden>

Revision history for this message
frenchie4111 (mdl0394) wrote :

This patch removes only the locked objects from the selection.

Revision history for this message
jazzynico (jazzynico) wrote :

Tested again on Windows XP, Inkscape trunk revision 12318. It works as expected. Locking deselects the locked layer. Hiding doesn't deselect anything.

Revision history for this message
jazzynico (jazzynico) wrote :

Fix committed revision 12328.
Thanks for the patch!

Changed in inkscape:
status: In Progress → Fix Committed
Bryce Harrington (bryce)
Changed in inkscape:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.