gvSIG bugs #322

TOC: Moving and copying group of layers doesn't work well

Added by Francisco José Peñarrubia about 12 years ago. Updated about 10 years ago.

Status:Fixed% Done:

100%

Priority:Normal
Assignee:Francisco José Peñarrubia
Category:-
Target version:-
Severity: Add-on name:Unknown
gvSIG version:1.11.0 Add-on version:
gvSIG build: Add-on build:
Operative System: Add-on resolve version:
Keywords:TOC Add-on resolve build:
Has patch:No

Description

GobVasco:
- Si son raster, no se pueden ver ni copiar.
- Al mover una capa encima de un grupo, se añade al grupo.
- No se sabe cuándo dejas una capa o grupo de capas encima o debajo de otra capa.
- No se pueden copiar y pegar grupos de capas.

copy_paste_with_crs_extension.txt Magnifier (57.5 KB) Andrés Maneiro, 03/05/2012 12:10 PM

0001-copy-or-cut-layer-above-agrupation.patch Magnifier (4.09 KB) Andrés Maneiro, 03/06/2012 07:07 PM

0002-Cleaning-codebase.patch Magnifier (2.15 KB) Andrés Maneiro, 03/06/2012 07:07 PM

0003-allow-pasting-layers-within-agrupations.patch Magnifier (2.56 KB) Andrés Maneiro, 03/06/2012 08:54 PM

History

#1 Updated by Francisco José Peñarrubia about 12 years ago

  • Status changed from New to Fixed

#2 Updated by Francisco Puga about 12 years ago

  • Status changed from Fixed to In progress

He reabierto este item.

Cada vez que intentas mover una capa en el TOC te sale un menú contextual bastante incómodo, y cuando intentas cerrar el menú (ESC) se cuelga. Tras consultarlo con varios usuarios no les ha parecido un comportamiento adecuado por lo que debería ser revertido.

Una sugerencia es añadir al menú contextual de las capas seleccionadas las opciones de:
- Mover 1 arriba
- Mover 1 abajo
- Mover arriba de todo
- Mover abajo del todo

Habría que escoger nombres un poco más correctos.

#3 Updated by Francisco José Peñarrubia about 12 years ago

  • Status changed from In progress to Fixed
  • % Done changed from 0 to 100

Applied in changeset r38043.

#4 Updated by Andrés Maneiro about 12 years ago

First of all: Fran, big kudos for this work! Although with some minor bugs, several users have let me know that this is an amazing feature. Now, let the battery of tests talk.

Imagine a layer structure in TOC like this:

  • [1] layer
  • [2] layer
  • [3] layer
  • [4] agrupation
    • [4.1] layer
    • [4.2] layer
    • [4.3] layer
  • [5] layer
  • [6] layer

Tests for moving layers:

  1. Passes: move layer to intermediate positions (not top or bottom).
  2. Passes: move agrupation to intermediate positions (not top or bottom).
  3. Fails (sometimes): move single layer or agrupation to top or botton. For example, move layer [3] to first position (on layer [1]) or bottom position (under layer [6]): sometimes it fails and the red bar freezes waiting for the user and the log says "Invalid drop location".
  4. Passes: move layer [2] within the agrupation [4].
  5. Fails: move layer [2] within the agrupation [4], above layer [4.1]. The layer is added above layer [5].
  6. Passes (but could be improved!): move layer [2] within the agrupation, below layer [4.3]. It works, but the red bar show no difference if the layer is going to be added inside the agrupation or outside (next test). What would be great is to make the red bar for this case shorter. If you just don't understand what I mean, please drop me a line :)
  7. Passes: move layer [2] above agrupation [4] or below layer [5].

Tests for copy/paste layers:

  1. Fails: copy/Paste layer. A contextual menu appears with two options ("paste on" or "paster under" the layer) and the menu doesn't dissapear when one of the options was selected although the layer was pasted. The layer is pasted, indeed. After talking with several users, the consensus about how it should be work is: don't show the contextual menu and choosing by default to paste the layer above the one selected or below the one selected and always do the same.

Other general comments:

  • The patch works with several kind of layers. The tests were done including raster, vectorial and WMS layers, so there is no different behaviour between layers.
  • It always keep the status of the layer (actived, deactivated) as it was. Thanks!
  • When working with agrupations the performance is slower than with a single layer (ie: moving layers to agrupations, moving agrupations around, etc).
  • Multiple selection fails. The tests were done with 1 item selected (layer or agrupation). Multiple selection (2 or more items) fails always, as only 1 of the items is moved. Although I see this very interesting, I don't see it prioritary.
  • The color of the bar: would is be possible to choose a more neutral color? For example: a black or a obscure gray should work. Red color is a very agressive one and I prefer limit their use in interfaces to critical messages.

Fran, let me know if you need any help. I'm available to work on this.

#5 Updated by Francisco José Peñarrubia about 12 years ago

  • Status changed from Fixed to In progress
  • % Done changed from 100 to 80

#6 Updated by Francisco José Peñarrubia about 12 years ago

  • Status changed from In progress to Fixed
  • % Done changed from 80 to 100

Applied in changeset r38051.

#7 Updated by Andrés Maneiro about 12 years ago

Tests for moving layers & agrupations around passes! :) Just one minor tweak on test 5: when moving layer [2] within the agrupation [4], above layer [4.1] is possible to add the layer above [4.1] (if the bar is shorter) or above layer [5] (is bar is longer).

Tests for moving layers & agrupations:

  • If having the extension org.gvsig.crs, copy/paste or cut/paste operations work but an error appears after the operation is done. The error doesn't happen if the extension CRS is removed from andami. Don't know if that's related to CRS or TOC actions. See log attached: copy_paste_with_crs_extension.txt
  • Copy or cut within an agrupation will copy/cut the source layer in the last position of TOC (below [6]). Steps to reproduce the error: select layer [2], choose copy/cut from contextual menu, select any layer within an agrupation (for example [4.2]), choose paste from contextual menu. Behaviour expected: the source layer [2] is copied/cut above the selected layer [4.2], but what really happens if that layer is copied/cut at the last position of TOC.
  • Copy or cut above an agrupation. Steps to reproduce the error: select layer [2], choose copy/cut, select agrupation [4], select paste. Expected behaviour: the source layer [2] is copied/cut above agrupation [4] but what really happens is that source layer is copied/cut within the agrupation.

#8 Updated by Francisco José Peñarrubia about 12 years ago

Andres: A mi me funciona bien y tengo la extensión org.gvsig.crs activa.
Los otros dos problemas, creo que te los dejo para tí ;-) (pero si necesitas algo me avisas)

Saludos.

Fran.

#9 Updated by Francisco Puga about 12 years ago

Andrés Maneiro wrote:

  • If having the extension org.gvsig.crs, copy/paste or cut/paste operations work but an error appears after the operation is done. The error doesn't happen if the extension CRS is removed from andami. Don't know if that's related to CRS or TOC actions. See log attached: copy_paste_with_crs_extension.txt

I think that is not related to TOC. It's a trouble with the native libproj.so.0.5.0 that is outdated. I think that is also related to #271. There is a bit mess with the mapcontrol, mapcontext, and i think that there are a lot of cases where is trying to reproyect a layer and is not needed.

#10 Updated by Andrés Maneiro about 12 years ago

Attached patches to allow a layer to be pasted above an agrupation (after either a copy or cut operation).

#11 Updated by Andrés Maneiro about 12 years ago

Attached patch to allow a layer to be pasted within agrupations (after either a copy or cut operation).

With this and the later patches attached, copy/cut operations work with agrupations. I think this bug can be closed and the changes applied as all the tests pass. I would rather commit the patches as a single commit.

#12 Updated by Andrés Maneiro about 12 years ago

Commited the changes for pasting layers to work in r38056. Please, review and close the bug if it fits the needs.

#13 Updated by Francisco José Peñarrubia about 12 years ago

  • Status changed from In progress to Fixed

Works ok.

Well done, Andrés!

#14 Updated by Álvaro Anguix about 10 years ago

  • Project changed from Application: gvSIG desktop to | gvSIG desktop 1
  • Category deleted (Application)
  • Target version deleted (1.12.0-rc1)

Also available in: Atom PDF