Skip to content

Commit

Permalink
Fix double setExtent() calls
Browse files Browse the repository at this point in the history
Whenever QgsMapCanvas::setExtent() would be called, the status scale
widget would be updated and cause another setExtent() call

Fixes issues with canvas getting invalid extent when loading projected layer
by mistake as lat/lon layer (scale going crazy)
  • Loading branch information
wonder-sk committed Jun 22, 2016
1 parent 8fcac87 commit c92afcf
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/app/qgsstatusbarscalewidget.cpp
Expand Up @@ -78,7 +78,9 @@ QgsStatusBarScaleWidget::~QgsStatusBarScaleWidget()

void QgsStatusBarScaleWidget::setScale( double scale )
{
mScale->blockSignals( true );
mScale->setScale( scale );
mScale->blockSignals( false );
}

bool QgsStatusBarScaleWidget::isLocked() const
Expand Down

1 comment on commit c92afcf

@nirvn
Copy link
Contributor

@nirvn nirvn commented on c92afcf Jun 23, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@wonder-sk , ahh, thanks, this fixes zoom last / zoom next actions (whereas the double setExtent() would create a same-zoom-level-change.

Please sign in to comment.