#932 closed bug (fixed)
Zoom Full, Zoom To Layer and Zoom To Selection work wrong
Reported by: | msieczka | Owned by: | homann |
---|---|---|---|
Priority: | major: does not work as expected | Milestone: | |
Component: | MapCanvas | Version: | Trunk |
Keywords: | Cc: | ||
Must Fix for Release: | Yes | Platform: | Debian |
Platform Version: | Awaiting user input: | no |
Description
- Create a vector with one rectangular polygon, fairly wider than tall.
- Add it to QGIS.
- The display extent should be adjusted to layer borders exactly. You can see it's not - on the right it is off by a pixel or 2 (one can't see the layers border to the right).
- "Zoom To Layer" now - QGIS zooms out by a fairly big amount instead.
- "Zoom Full" now - it zooms in, but not correctly - like in point #3.
- Select the feature. "Zoom To Selection" now - the result is the same like in point #4.
If you create a vector containing one rectangular polygon, but fairly taller than wide instead, and reproduce the steps, the 1-2 pixels offset takes place on the bottom edge of the canvas.
SVN r8098, built and running against stock QT 4.3.2 on Ubuntu Gutsy x86.
Change History (8)
follow-up: 3 comment:1 by , 16 years ago
Milestone: | Version 0.9.2 → Version 1.0 |
---|---|
Must Fix for Release: | Yes → No |
Owner: | changed from | to
Priority: | major: does not work as expected → minor: annoyance or enhancement |
Status: | new → assigned |
Type: | bug → enhancement |
comment:2 by , 16 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
I added the same margin (5%) for all three zoom methods in r8099.
comment:3 by , 16 years ago
Milestone: | Version 1.0 → Version 0.9.2 |
---|---|
Must Fix for Release: | No → Yes |
Priority: | minor: annoyance or enhancement → major: does not work as expected |
Resolution: | fixed |
Status: | closed → reopened |
Type: | enhancement → bug |
Replying to homann:
With Qt drawing system, it can never be moer exact than it is.
Hmm, but it works perfectly fine, to a single pixel, in QGIS 0.8.1 r7193, while in 0.9 SVN r8098 it doesn't, with the same data. Both QGIS versions built against QT 4.3.3. Seems like a regression. Smallish but anyway. Maybe worth looking into, might a symptom of some undesired change?
The line border width makes a difference regarding 1 or 2 pixels.
Not the case. I'm reffering to a default 1 pixel width in all examples here.
As to the forced 5% margin when zooming too a layer/selection/all - generally good idea, but not always desired. Best if it was configurable.
follow-up: 5 comment:4 by , 16 years ago
Awaiting user input: | set |
---|---|
Milestone: | Version 0.9.2 → Version 1.0 |
Can you please re-state what you think does not work as expected? A 5% margin means that there is normally more than 1 pixel between layer and canvas edge, so that is not a problem anymore.
0.9.2 is closed for bug fixing.
comment:5 by , 16 years ago
Replying to homann:
Can you please re-state what you think does not work as expected?
If not the 5% margin, there is a 1 pixel offset to the right and bottom when you zoom to layer/selection/all.
A 5% margin means that there is normally more than 1 pixel between layer and canvas edge, so that is not a problem anymore.
The recently introduced 5% margin just hides the issue, not fix it.
Since in QGIS 0.8.1 the 1 pixel offset at zoom to layer/selection/all is not present, and it is present in 0.9, it's a regression.
0.9.2 is closed for bug fixing.
Too bad.
comment:6 by , 16 years ago
Awaiting user input: | unset |
---|
comment:7 by , 16 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
1) We got an enhancement request for a margin when zooming. I agreed, posted a question to the amiling list and got no objections and changed the functionality. 2) As the functionality has changed intentionality , it will not work the same as in 0.8.1 and it should not either. There is no regression problem. 3) Even in 0.8.1 it did not work reliably as you state, as it was dependent on line width (I have verified this).
For these three reasons, I will mark this issue as closed. If you want the old functionality back, open a new issue and mark it as enhancement (or re-name this).
With Qt drawing system, it can never be moer exact than it is. The line border width makes a difference regarding 1 or 2 pixels.
Zoom to layer was changed to give a margin around the layer, possibly the same should be done for the other zoom tools also.
See #881