Bug report #12486

QgsRubberBand visibility flag resets to true after map zoom

Added by Anatoliy Golubev over 9 years ago. Updated over 9 years ago.

Status:Closed
Priority:Normal
Assignee:Sandro Santilli
Category:Map Canvas
Affected QGIS version:master Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:Yes Resolution:fixed/implemented
Crashes QGIS or corrupts data:No Copied to github as #:20634

Description

How to reproduce:
1. create rubberband on map;
2. rubberband->setVisible( false );
3. mapCanvas->zoomIn();
4. rubberband is shown again;

This is related to #12392

Patch supplied, see https://github.com/qgis/QGIS/pull/1972

Associated revisions

Revision 7210c4a6
Added by Anatoliy Golubev over 9 years ago

Fix QgsRubberBand visibility behavior (followup 37171dc0)

Visibility behavior stays the same as in QGIS 2.6
Test included.

Fix #12486
Contributed via https://github.com/qgis/QGIS/pull/1972

History

#1 Updated by Sandro Santilli over 9 years ago

is this a regression from 2.6 ?

#2 Updated by Anatoliy Golubev over 9 years ago

I think it is a regression.

QGIS 2.6:
map extent changed -> QgsMapCanvasItem::updatePosition() called, visibility not changed.

QGIS master (after fixing 12392):
map extent changed -> QgsRubberBand::updatePosition() override called, which call QgsRubberBand::updateRect() and set visibility to true.

#3 Updated by Anatoliy Golubev over 9 years ago

  • Status changed from Open to Closed

#4 Updated by Anatoliy Golubev over 9 years ago

  • Status changed from Closed to Reopened

Sandro, can you backport it to 2.8 branch? It is affected too.

#5 Updated by Sandro Santilli over 9 years ago

  • Resolution set to fixed/implemented
  • Status changed from Reopened to Closed
  • Target version set to Version 2.8.2
  • % Done changed from 0 to 100

It is backported already. The commit reference intercepted by HUB is for the one in 2.8 branch.
The one in master is 892f142e28bb0f1fb8672c88610f14523bd49dff

Also available in: Atom PDF