Skip to content

Commit b946c33

Browse files
author
mhugent
committedJun 1, 2010
Small enhancements for labeling dialog: disable minimum size ui for points, add pt to font name and set two decimal places for distance spin boxes
git-svn-id: http://svn.osgeo.org/qgis/trunk@13616 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 3887ec9 commit b946c33

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed
 

‎src/app/qgslabelinggui.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ QgsLabelingGui::QgsLabelingGui( QgsPalLabeling* lbl, QgsVectorLayer* layer, QWid
6161
}
6262

6363
chkMergeLines->setEnabled( layer->geometryType() == QGis::Line );
64+
label_19->setEnabled( layer->geometryType() != QGis::Point );
65+
mMinSizeSpinBox->setEnabled( layer->geometryType() != QGis::Point );
6466

6567
populateFieldNames();
6668

@@ -266,7 +268,7 @@ void QgsLabelingGui::changeTextFont()
266268

267269
void QgsLabelingGui::updateFont( QFont font )
268270
{
269-
lblFontName->setText( QString( "%1, %2" ).arg( font.family() ).arg( font.pointSize() ) );
271+
lblFontName->setText( QString( "%1, %2 %3" ).arg( font.family() ).arg( font.pointSize() ).arg( tr( "pt" ) ) );
270272
lblFontPreview->setFont( font );
271273

272274
updatePreview();

‎src/ui/qgslabelingguibase.ui

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@
7777
<item>
7878
<widget class="QStackedWidget" name="stackedPlacement">
7979
<property name="currentIndex">
80-
<number>1</number>
80+
<number>0</number>
8181
</property>
8282
<widget class="QWidget" name="pagePoint">
8383
<layout class="QVBoxLayout" name="verticalLayout_2">
@@ -182,7 +182,7 @@
182182
<item>
183183
<widget class="QStackedWidget" name="stackedOptions">
184184
<property name="currentIndex">
185-
<number>1</number>
185+
<number>0</number>
186186
</property>
187187
<widget class="QWidget" name="pageOptionsPoint">
188188
<layout class="QGridLayout" name="gridLayout_2">
@@ -199,7 +199,7 @@
199199
<item row="0" column="1">
200200
<widget class="QDoubleSpinBox" name="spinDistPoint">
201201
<property name="decimals">
202-
<number>0</number>
202+
<number>2</number>
203203
</property>
204204
</widget>
205205
</item>
@@ -305,7 +305,7 @@
305305
<item>
306306
<widget class="QDoubleSpinBox" name="spinDistLine">
307307
<property name="decimals">
308-
<number>0</number>
308+
<number>2</number>
309309
</property>
310310
</widget>
311311
</item>

0 commit comments

Comments
 (0)
Please sign in to comment.