File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -157,7 +157,7 @@ void QgsScaleComboBox::fixupScale()
157157 if ( ok && ( newScale != oldScale ) )
158158 {
159159 // if a user types scale = 2345, we transform to 1:2345
160- if ( userSetScale )
160+ if ( userSetScale && newScale >= 1.0 )
161161 {
162162 mScale = 1 / newScale;
163163 }
Original file line number Diff line number Diff line change @@ -75,12 +75,12 @@ void TestQgsScaleComboBox::basic()
7575 QCOMPARE ( s->scaleString (), QString ( " 1:50" ) );
7676 QCOMPARE ( s->scale (), ( double ) 0.02 );
7777
78- // Testing conversion from number to "x:1 "
78+ // Testing conversion from number to "1:x "
7979 l->setText ( " " );
8080 QTest::keyClicks ( l, QLocale::system ().toString ( 42 ) );
8181 QTest::keyClick ( l, Qt::Key_Return );
82- QCOMPARE ( s->scaleString (), QString ( " 42:1 " ) );
83- QCOMPARE ( s->scale (), ( double ) 42 );
82+ QCOMPARE ( s->scaleString (), QString ( " 1:42 " ) );
83+ QCOMPARE ( s->scale (), ( double ) 1.0 / ( double ) 42.0 );
8484
8585 // Testing rounding and conversion from illegal
8686
You can’t perform that action at this time.
0 commit comments