File tree 1 file changed +11
-1
lines changed
1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -1847,7 +1847,8 @@ void QgisApp::createStatusBar()
1847
1847
mScaleEdit ->setMaximumHeight ( 20 );
1848
1848
mScaleEdit ->setContentsMargins ( 0 , 0 , 0 , 0 );
1849
1849
mScaleEdit ->setAlignment ( Qt::AlignLeft );
1850
- QRegExp validator ( " \\ d+\\ .?\\ d*:\\ d+\\ .?\\ d*" );
1850
+ // QRegExp validator( "\\d+\\.?\\d*:\\d+\\.?\\d*" );
1851
+ QRegExp validator ( " \\ d+\\ .?\\ d*:\\ d+\\ .?\\ d*|\\ d+\\ .?\\ d*" );
1851
1852
mScaleEditValidator = new QRegExpValidator ( validator, mScaleEdit );
1852
1853
mScaleEdit ->setValidator ( mScaleEditValidator );
1853
1854
mScaleEdit ->setWhatsThis ( tr ( " Displays the current map scale" ) );
@@ -4932,6 +4933,15 @@ void QgisApp::userScale()
4932
4933
mMapCanvas ->zoomScale ( rightSide / leftSide );
4933
4934
}
4934
4935
}
4936
+ else
4937
+ {
4938
+ bool rightOk;
4939
+ double rightSide = parts.at ( 0 ).toDouble ( &rightOk );
4940
+ if ( rightOk )
4941
+ {
4942
+ mMapCanvas ->zoomScale ( rightSide );
4943
+ }
4944
+ }
4935
4945
}
4936
4946
4937
4947
void QgisApp::userCenter ()
You can’t perform that action at this time.
0 commit comments