Index: src/app/qgisapp.cpp =================================================================== --- src/app/qgisapp.cpp (revisione 14229) +++ src/app/qgisapp.cpp (copia locale) @@ -1847,7 +1847,8 @@ mScaleEdit->setMaximumHeight( 20 ); mScaleEdit->setContentsMargins( 0, 0, 0, 0 ); mScaleEdit->setAlignment( Qt::AlignLeft ); - QRegExp validator( "\\d+\\.?\\d*:\\d+\\.?\\d*" ); + // QRegExp validator( "\\d+\\.?\\d*:\\d+\\.?\\d*" ); + QRegExp validator( "\\d+\\.?\\d*:\\d+\\.?\\d*|\\d+\\.?\\d*" ); mScaleEditValidator = new QRegExpValidator( validator, mScaleEdit ); mScaleEdit->setValidator( mScaleEditValidator ); mScaleEdit->setWhatsThis( tr( "Displays the current map scale" ) ); @@ -4932,6 +4933,15 @@ mMapCanvas->zoomScale( rightSide / leftSide ); } } + else + { + bool rightOk; + double rightSide = parts.at( 0 ).toDouble( &rightOk ); + if ( rightOk ) + { + mMapCanvas->zoomScale( rightSide ); + } + } } void QgisApp::userCenter()