Skip to content

Commit dc48195

Browse files
committedOct 3, 2016
Fix many labeling unit settings are lost on closing dialog
(and also don't trigger auto preview)
1 parent ba210d0 commit dc48195

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed
 

‎src/app/qgslabelinggui.cpp

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -352,6 +352,7 @@ QgsLabelingGui::QgsLabelingGui( QgsVectorLayer* layer, QgsMapCanvas* mapCanvas,
352352
<< mLineDistanceDDBtn
353353
<< mLineDistanceSpnBx
354354
<< mLineDistanceUnitDDBtn
355+
<< mLineDistanceUnitWidget
355356
<< mMaxCharAngleDDBtn
356357
<< mMaxCharAngleInDSpinBox
357358
<< mMaxCharAngleOutDSpinBox
@@ -365,6 +366,7 @@ QgsLabelingGui::QgsLabelingGui( QgsVectorLayer* layer, QgsMapCanvas* mapCanvas,
365366
<< mPointAngleSpinBox
366367
<< mPointOffsetDDBtn
367368
<< mPointOffsetUnitsDDBtn
369+
<< mPointOffsetUnitWidget
368370
<< mPointOffsetXSpinBox
369371
<< mPointOffsetYSpinBox
370372
<< mPointPositionOrderDDBtn
@@ -376,6 +378,7 @@ QgsLabelingGui::QgsLabelingGui( QgsVectorLayer* layer, QgsMapCanvas* mapCanvas,
376378
<< mRepeatDistanceDDBtn
377379
<< mRepeatDistanceSpinBox
378380
<< mRepeatDistanceUnitDDBtn
381+
<< mRepeatDistanceUnitWidget
379382
<< mScaleBasedVisibilityChkBx
380383
<< mScaleBasedVisibilityDDBtn
381384
<< mScaleBasedVisibilityMaxDDBtn
@@ -394,10 +397,12 @@ QgsLabelingGui::QgsLabelingGui( QgsVectorLayer* layer, QgsMapCanvas* mapCanvas,
394397
<< mShadowOffsetGlobalChkBx
395398
<< mShadowOffsetSpnBx
396399
<< mShadowOffsetUnitsDDBtn
400+
<< mShadowOffsetUnitWidget
397401
<< mShadowRadiusAlphaChkBx
398402
<< mShadowRadiusDDBtn
399403
<< mShadowRadiusDblSpnBx
400404
<< mShadowRadiusUnitsDDBtn
405+
<< mShadowRadiusUnitWidget
401406
<< mShadowScaleDDBtn
402407
<< mShadowScaleSpnBx
403408
<< mShadowTranspDDBtn
@@ -411,6 +416,7 @@ QgsLabelingGui::QgsLabelingGui( QgsVectorLayer* layer, QgsMapCanvas* mapCanvas,
411416
<< mShapeBorderUnitsDDBtn
412417
<< mShapeBorderWidthDDBtn
413418
<< mShapeBorderWidthSpnBx
419+
<< mShapeBorderWidthUnitWidget
414420
<< mShapeDrawChkBx
415421
<< mShapeDrawDDBtn
416422
<< mShapeFillColorBtn
@@ -419,6 +425,7 @@ QgsLabelingGui::QgsLabelingGui( QgsVectorLayer* layer, QgsMapCanvas* mapCanvas,
419425
<< mShapeOffsetUnitsDDBtn
420426
<< mShapeOffsetXSpnBx
421427
<< mShapeOffsetYSpnBx
428+
<< mShapeOffsetUnitWidget
422429
<< mShapePenStyleCmbBx
423430
<< mShapePenStyleDDBtn
424431
<< mShapeRadiusDDBtn
@@ -429,11 +436,13 @@ QgsLabelingGui::QgsLabelingGui( QgsVectorLayer* layer, QgsMapCanvas* mapCanvas,
429436
<< mShapeRotationDDBtn
430437
<< mShapeRotationDblSpnBx
431438
<< mShapeRotationTypeDDBtn
439+
<< mShapeRadiusUnitWidget
432440
<< mShapeSVGPathDDBtn
433441
<< mShapeSVGPathLineEdit
434442
<< mShapeSizeCmbBx
435443
<< mShapeSizeTypeDDBtn
436444
<< mShapeSizeUnitsDDBtn
445+
<< mShapeSizeUnitWidget
437446
<< mShapeSizeXDDBtn
438447
<< mShapeSizeXSpnBx
439448
<< mShapeSizeYDDBtn
@@ -507,6 +516,10 @@ void QgsLabelingGui::connectValueChanged( QList<QWidget *> widgets, const char *
507516
{
508517
connect( w, SIGNAL( fieldChanged( QString ) ), this, slot );
509518
}
519+
else if ( QgsUnitSelectionWidget* w = qobject_cast<QgsUnitSelectionWidget*>( widget ) )
520+
{
521+
connect( w, SIGNAL( changed() ), this, slot );
522+
}
510523
else if ( QComboBox* w = qobject_cast<QComboBox*>( widget ) )
511524
{
512525
connect( w, SIGNAL( currentIndexChanged( int ) ), this, slot );

0 commit comments

Comments
 (0)
Please sign in to comment.