Skip to content
Permalink
Browse files

avoid useless canvas redraw when user interacts with scale selector

  • Loading branch information
alexbruy committed Jan 21, 2012
1 parent 068493d commit ddb51fe5babf6333c2e39ef77be480e9cbc1fab8
Showing with 9 additions and 0 deletions.
  1. +7 −0 src/app/qgisapp.cpp
  2. +2 −0 src/app/qgisapp.h
@@ -4348,6 +4348,8 @@ void QgisApp::showScale( double theScale )
else
mScaleEdit->setText( tr( "Invalid scale" ) );

mOldScale = mScaleEdit->text();

// Set minimum necessary width
if ( mScaleEdit->width() > mScaleEdit->minimumWidth() )
{
@@ -4357,6 +4359,11 @@ void QgisApp::showScale( double theScale )

void QgisApp::userScale()
{
if ( mOldScale == mScaleEdit->text() )
{
return;
}

QStringList parts = mScaleEdit->text().split( ':' );
if ( parts.size() == 2 )
{
@@ -1079,6 +1079,8 @@ class QgisApp : public QMainWindow, private Ui::MainWindow

//! project changed
void projectChanged( const QDomDocument & );

QString mOldScale;
};

#endif

0 comments on commit ddb51fe

Please sign in to comment.
You can’t perform that action at this time.