Locked layers not completely locked.

Bug #181493 reported by Martin Andersen on 2008-01-09
22
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Inkscape
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.

Related branches

MenTaLguY (mental) on 2008-01-09
Changed in inkscape:
importance: Undecided → Medium
status: New → Confirmed
~suv (suv-lp) on 2011-03-02
tags: added: layers
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
jazzynico (jazzynico) wrote :

Correction: unselecting everything in the layer...

~suv (suv-lp) on 2013-03-04
tags: added: easy-fix
frenchie4111 (mdl0394) wrote :

I am looking into it right now

Changed in inkscape:
assignee: nobody → frenchie4111 (mdl0394)

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>

frenchie4111 (mdl0394) wrote :

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

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.

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
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.

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
>

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.

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.

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
~suv (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>

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>

frenchie4111 (mdl0394) wrote :

This patch removes only the locked objects from the selection.

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.

jazzynico (jazzynico) wrote :

Fix committed revision 12328.
Thanks for the patch!

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

Other bug subscribers