Opened 17 years ago

Closed 14 years ago

#699 closed patch (fixed)

problem when moving quickly a layer trough the legend

Reported by: tutey@… Owned by: brushtyler
Priority: major: does not work as expected Milestone: Version 1.5.0
Component: Map Legend Version: Trunk
Keywords: Cc: pcav
Must Fix for Release: Yes Platform: Linux
Platform Version: Awaiting user input: no

Description

QGIS 0.8.1 SVN 6834, built and and running against QT 4.2.3 (but the bugs have been present "since ever", I just did not have time to report them)

  1. one can't move a layer to the top of the layer's list when there's a group present; to reproduce;

a) add a group

b) add a layer

c) move the group to the top of the list

d) now try moving the layer to the top of the list - you can't; instead, the layer gets included into the group, which you didn't want

  1. you can't move the layer to the outside of the group when there is only 1 group and other layers or groups
  1. changing layers' order, when there are expanded groups, changes the order of layers in the groups; to reproduce:

a) add a group

b) add layer called "l1" and layer called "l2" to that groupm, so that "l1" is on the top

c) add another layer, out of the group

d) move the newly added layer down - you'll notice that now "l2" comes first

Maciek

Attachments (1)

fix699.diff (965 bytes ) - added by brushtyler 14 years ago.
patch

Download all attachments as: .zip

Change History (30)

comment:1 by mhugent, 17 years ago

to 1.: But you can move the group down. The point is that if you move a layer to a group, qgis cannot know if you want to insert the layer into the group or move the layer. On the other hand, if you move a group to a layer, it's clear that it is a move because groups cannot be inserted into layers. Maybe a solution would be to have a key pressed so that qgis knows you want a move, not an insert. But I wonder how users should find out which key it is. Do you have a more usable solution?

to 2. Doesn't right click to legend and 'Make toplevel item' work for you in that situation?

to 3. Hm, for me, when I move a layer into a group, the moved layer comes at the last position, but the order of the already present layers is preserved.

Do you have a 0.9 version at hand to test if those problems are still present for you?

Marco

comment:2 by msieczka, 17 years ago

Milestone: Version 0.8.2Version 0.9
Version: 0.8.1HEAD

to 1 and 2. 'Make toplevel item' is the solution. I did't use it, as I didn't know what it was for. Thanks for the hint.

to 3. I still can reproduce it. I forgot to mention that this issue is more likely to crop out if the layers in the group are collapsed and the one being added is not collapsed. More layers in the group could also help to spot it. More details how to reproduce:

  1. add a group
  2. add three or more layers, name them [F2] l1, l2, l3 respectively
  3. collapse the layers
  4. move the layers into the group, in order l1, l2, l3 etc
  5. add a new layer (don't collapse it)
  6. move the new layer *slowly* into the group

For me, in most cases then the order in the group becomes reverted (ie, "l3,l2,l1" instead of "l1,l2,l3".

Also, when there's a layer outside the group, on the bottom of the legend, and it's moved into the group subsequently, it usually doesn't come as the last, but the one before the last.

I'm convinced there is something wrong with ordering layers in the group. For example create a group with five layer called l1-l5, set them in descending order and start moving the first to the bottom and back, in random moves. Sooner or later the initial order is broken.

Checked in QGIS 0.9 SVN 7201 built and running against QT 4.3.1.

comment:3 by msieczka, 16 years ago

This bug has been around for a very long time now and I can still reproduce it in trunk r9056. The scenario in comment:2 is still valid (though it doesn't necessarily take using groups to reproduce the bug).

comment:4 by homann, 15 years ago

Owner: changed from nobody to homann
Status: newassigned

I fiddled a bit with the logic in the legend. Can you see if any of these issues still exists after r9547 ?

comment:5 by paulp575, 15 years ago

Since I was one of the user who added comments to #825 (which was incorporated into #699 as a duplicate) I would like to try r9547, but have no idea what that is nor do I know how to find if and once I am pointed to it, what do I do with it?

Sorry, never been involved in development so this is new to me! I'm a user!

Thanks,

paulp575

comment:6 by homann, 15 years ago

See

http://wiki.qgis.org/qgiswiki/BuildingFromSource#head-8e1e1ff25b5e9f587393e0592c0ff34891ec07cc

If you check out trunk as mentioned in the above document, you'll be fine. No binaries available at this time.

comment:7 by paulp575, 15 years ago

This is all greek to me!

I use windows and look for already compiled executables (I think that's what they are called).

Is there anything I can do to test this using Windows before the ticket is closed or fully incorporated into release 1.0.0?

Thanks,

paulp575

in reply to:  2 ; comment:8 by msieczka, 15 years ago

Per request https://trac.osgeo.org/qgis/ticket/699#comment:4 - the bug is partly fixed for me. Details:

  1. add a group
  2. add three or more layers, name them [F2] l1, l2, l3 respectively
  3. collapse the layers
  4. move the layers into the group, in order l1, l2, l3 etc
  5. add a new layer (don't collapse it)
  6. move the new layer *slowly* into the group

For me, in most cases then the order in the group becomes reverted (ie, "l3,l2,l1" instead of "l1,l2,l3".

This one's gone...

Also, when there's a layer outside the group, on the bottom of the legend, and it's moved into the group subsequently, it usually doesn't come as the last, but the one before the last.

Gone too.

Create a group with five layer called l1-l5, set them in descending order and start moving the first to the bottom and back, in random moves. Sooner or later the initial order is broken.

Still present. Even 3 layers are enough to reproduce. The more of them, the easier though.

Debian testing amd64, QGIS SVN trunk r9552, QT 4.4.3.

in reply to:  8 ; comment:9 by brendonwp, 15 years ago

Replying to msieczka:

Per request https://trac.osgeo.org/qgis/ticket/699#comment:4 - the bug is partly fixed for me. Details:

  1. add a group
  2. add three or more layers, name them [F2] l1, l2, l3 respectively
  3. collapse the layers
  4. move the layers into the group, in order l1, l2, l3 etc
  5. add a new layer (don't collapse it)
  6. move the new layer *slowly* into the group

For me, in most cases then the order in the group becomes reverted (ie, "l3,l2,l1" instead of "l1,l2,l3".

This one's gone...

Also, when there's a layer outside the group, on the bottom of the legend, and it's moved into the group subsequently, it usually doesn't come as the last, but the one before the last.

Gone too.

Create a group with five layer called l1-l5, set them in descending order and start moving the first to the bottom and back, in random moves. Sooner or later the initial order is broken.

Still present. Even 3 layers are enough to reproduce. The more of them, the easier though.

Debian testing amd64, QGIS SVN trunk r9552, QT 4.4.3.

On QGIS 1.0 Preview 2, Ubuntu 8.04 cannot reproduce these issues. Recommending closure.

in reply to:  9 ; comment:10 by msieczka, 15 years ago

Replying to brendonwp:

On QGIS 1.0 Preview 2, Ubuntu 8.04 cannot reproduce these issues. Recommending closure.

For two years now I have been seeing this bug on various GNU/Linux Distros (successive Ubuntu editions, Debian) and Windows XP Home, various architectures and QT versions. And I still am seeing this bug in the latest SVN trunk r9725 on Debian testing amd64, QT 4.4.3.

The bug is very easy to reproduce. Again:

  1. Add 5 Shapefile layers called l1-l5.
  1. Set them in descending order.
  1. Start moving the first to the bottom and back, in random moves.
  1. Sooner or later the initial order is broken - e.g. l5 jumps to the top although you didn't move it yourself.

comment:11 by jctull, 15 years ago

Milestone: Version 1.0.2Version 1.1.0

This is still a problem. I do not recall this being an issue for me up to, perhaps including, version 1.0.0. With trunk build from 19 March, I simply cannot add a new layer item and move it without my layers being massively rearranged. I am using qt4.5-rc1, so perhaps that is to blame.

comment:12 by paulp575, 15 years ago

Milestone: Version 1.1.0Version 1.0.2
Platform: AllWindows
Platform Version: XP Professional

I last saw this in version 0.11, but am unable to test it in version 1.0 under Windows as I don't see an executable I can download.

I use windows and look for already compiled executables (I think that's what they are called).

comment:13 by msieczka, 15 years ago

Platform: WindowsAll
Platform Version: XP Professional

I confirm this bug is still present on Debian too, as outlined in comment:10.

Very annoying, long lasting (2 years!) bug which breaks layers order in a unpredictable way. It should be fixed in the 1.0.x.

comment:14 by lutra, 15 years ago

Cc: pcav added

I cannot reproduce none of the described problems on QGIS 1.2 (rev. 10988 on ubuntu 9.04), everything seems to have been solved.

Closing?

comment:15 by lutra, 15 years ago

Resolution: fixed
Status: assignedclosed

Closing this ticket, reopen it if necessary.

comment:16 by homann, 15 years ago

Milestone: Version 1.0.3Version 1.2.0
Priority: major: does not work as expectedminor: annoyance
Resolution: fixed
Status: closedreopened

I can still see this happening in r11146.

I think the best bet to fix this once and for all, is to not move the actualy name around all the time, but use a 'divider' type of pointer that shows where the name should be inserted, when the button is released.

comment:17 by lutra, 15 years ago

Hi,

I just compiled r11147 and I cannot confirm again the problem. Almost.

Let see:

1) I cannot confirm, as I can move the layer to the top of the list without any problem

2) Almost confirmed: If there is just one group and one or more layers I can move the layers outside the group above it but not under it. If I add a second group under the first one, I can move the layers outside the group, above it, between the two groups or inside the last one.

3) I cannot confirm the behaviour

Tested on Ubuntu 9.04. I'll post a screencast in minutes.

comment:18 by jctull, 15 years ago

There seems to be a speed-sensitivity trigger that causes the legend mangling. If you move items quickly across groups, the error tends to arise. If you move items slowly, things are usually handled ok.

comment:19 by lutra, 15 years ago

Here is the cast

http://www.faunalia.pt/downloads/699.mpeg

I agree that should be possible to put a layer outside/under a group even if there is only one group or if is the lower one. The other two issues seems that were already fixed(?).

in reply to:  10 ; comment:20 by homann, 15 years ago

The bug is very easy to reproduce. Again:

  1. Add 5 Shapefile layers called l1-l5.
  1. Set them in descending order.
  1. Start moving the first to the bottom and back, in random moves.
  1. Sooner or later the initial order is broken - e.g. l5 jumps to the top although you didn't move it yourself.

This is what I see, by moving one layer back and fort - without releasin the mouse button - I can change the order of other layers. This is with debug gompiled on, printing on the screen and slowing things down.

in reply to:  20 comment:21 by lutra, 15 years ago

This is with debug gompiled on, printing on the screen and slowing things down.

there are no problems (on 1.2) also without the debug option.

in reply to:  18 comment:22 by lutra, 15 years ago

Summary: several bugs in managing groups in the layer's listproblem when moving quickly a layer trough the legend

Replying to jctull:

There seems to be a speed-sensitivity trigger that causes the legend mangling. If you move items quickly across groups, the error tends to arise. If you move items slowly, things are usually handled ok.

Ok, now I understand when you say that you need to move fast the item across the legend. As a matter of fact this messes up the order, but to reproduce it I have to move the item really fast.

I would like them to try make a little order in this ticket.

Regarding the original description:

1) The problem is gone as already pointed by many here

2) Using 'Make toplevel item' works as supposed to move a layer outside the last group of the legend, so here too, no problem.

3) I cannot replicate the described problem at least when I move the layer down/up, inside/outside the group at a low speed BUT as a matter of fact the problem shows up if you move the mouse fast, like in the case you have along list of layers and you want to move to the top/bottom the one you have selected.

I guess that all we still have is the problem when moving fast a selected layer trough other layers/groups and the subsequent mess produced in the layers order.

I suggest to change the title, if someone does not agree with it just change it.

comment:23 by homann, 15 years ago

Resolution: fixed
Status: reopenedclosed

The messing up of order should be fixed in r11233.

comment:24 by lutra, 15 years ago

this is a major improvement to me. I guess we just miss multiple selections, than it would be perfect. Thanks a lot.

in reply to:  23 comment:25 by msieczka, 14 years ago

Milestone: Version 1.2.0Version 1.5.0
Platform: AllLinux
Priority: minor: annoyancemajor: does not work as expected
Resolution: fixed
Status: closedreopened

Replying to homann:

The messing up of order should be fixed in r11233.

A similar bug is present again in trunk, at least as of r13412 built from SVN, and in the package provided at http://debian.gfoss.it/pool/main/q/qgis/qgis_1.5.0~svn20100411+gfossit60-2_amd64.deb. Please move this report to another ticket if it's not related.

To reproduce:

  1. Add 3 Shapefile layers.
  1. Double-click them, move them around, then single-click on either. Sooner or later you'll notice they jump around on the list.

Debian testing amd64, built and running vs QT 4.6.2.

by brushtyler, 14 years ago

Attachment: fix699.diff added

patch

comment:26 by brushtyler, 14 years ago

Replying to msieczka:

A similar bug is present again in trunk, at least as of r13412 built from SVN, and in the package provided at http://debian.gfoss.it/pool/main/q/qgis/qgis_1.5.0~svn20100411+gfossit60-2_amd64.deb. Please move this report to another ticket if it's not related.

It's present also on Ubuntu 9.04, both build from SVN r13576 and QGis 1.4.0. To reproduce it:

  1. add 3 shapefiles
  1. move very quickly the first layer on the bottom of the legend.
  1. click on the new first layer.

I attached a patch to fix this bug (the same code resolves some crashes too, i.e. when you drop a layer in an invalid place).

comment:27 by pcav, 14 years ago

Type: bugpatch

comment:28 by brushtyler, 14 years ago

Owner: changed from homann to brushtyler
Status: reopenednew

comment:29 by brushtyler, 14 years ago

Resolution: fixed
Status: newclosed

Fixed by applying the attached patch (from r13641).

Note: See TracTickets for help on using tickets.