Opened 14 years ago

Last modified 13 years ago

#3155 assigned bug

Zoom to layer works incorrectly while layer editing

Reported by: dr Owned by: sunilkcube
Priority: major: does not work as expected Milestone: Version 1.7.0
Component: MapCanvas Version: Trunk
Keywords: Cc: dr, gislab, alexbruy
Must Fix for Release: Yes Platform: All
Platform Version: Awaiting user input: no

Description

  1. Open raster layer (http://gis-lab.info/share/DR/modis.7z);
  2. Add new polygonal vector layer;
  3. Draw little polygon in right top corner of raster;
  4. Stop editing and save changes;
  5. Make with zoom out tool raster layer looks like small rectangle in center of View;
  6. Toggle editing and draw new polygon in right top corner of view;
  7. Without stopping editing try make zoom to layer on vector layer;
  8. Looks like extent calculates incorrect.
  9. Stop editing, don't save changes and try zoom to vector layer again. Zoom to layer work incorrectly.

Attachments (1)

seq -diagram.jpg (111.1 KB ) - added by sunilkcube 13 years ago.
Sequence Diagram to illustrate the bug situation

Download all attachments as: .zip

Change History (7)

comment:1 by gislab, 13 years ago

5-7. I confirm, the extent looks wrong. http://gis-lab.info/images/screenshots/20101028-69a-65kb.jpg

  1. I confirm, after rejecting saving new polygon it seems that extent is still larger than small polygon on the raster.

http://gis-lab.info/images/screenshots/20101028-19d-62kb.jpg

comment:2 by sunilkcube, 13 years ago

Owner: changed from nobody to sunilkcube
Status: newassigned

comment:3 by jef, 13 years ago

Recalculating the extent on every editing operation could be quite expensive. So it might be useful to make this optional and disable "zoom to layer" while editing. There's also the issue of undo/redo.

by sunilkcube, 13 years ago

Attachment: seq -diagram.jpg added

Sequence Diagram to illustrate the bug situation

comment:4 by borysiasty, 13 years ago

What about recalculating the extent when the "zoom to layer" pressed (only if the layer is dirty).

in reply to:  4 ; comment:5 by sunilkcube, 13 years ago

Replying to borysiasty:

What about recalculating the extent when the "zoom to layer" pressed (only if the layer is dirty).

The comment from Jef tells that calculating extents while editing is quite expensive.

in reply to:  5 comment:6 by borysiasty, 13 years ago

Replying to sunilkcube:

The comment from Jef tells that calculating extents while editing is quite expensive.

Not exactly, the comment from Jef is about recalculating on every operation.

Note: See TracTickets for help on using tickets.