Skip to content

Commit 31dc608

Browse files
committedOct 6, 2016
Fix many labeling unit settings are lost on closing dialog
(and also don't trigger auto preview) (cherry-picked from dc48195)
1 parent dea2927 commit 31dc608

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
@@ -354,6 +354,7 @@ QgsLabelingGui::QgsLabelingGui( QgsVectorLayer* layer, QgsMapCanvas* mapCanvas,
354354
<< mLineDistanceDDBtn
355355
<< mLineDistanceSpnBx
356356
<< mLineDistanceUnitDDBtn
357+
<< mLineDistanceUnitWidget
357358
<< mMaxCharAngleDDBtn
358359
<< mMaxCharAngleInDSpinBox
359360
<< mMaxCharAngleOutDSpinBox
@@ -367,6 +368,7 @@ QgsLabelingGui::QgsLabelingGui( QgsVectorLayer* layer, QgsMapCanvas* mapCanvas,
367368
<< mPointAngleSpinBox
368369
<< mPointOffsetDDBtn
369370
<< mPointOffsetUnitsDDBtn
371+
<< mPointOffsetUnitWidget
370372
<< mPointOffsetXSpinBox
371373
<< mPointOffsetYSpinBox
372374
<< mPointPositionOrderDDBtn
@@ -378,6 +380,7 @@ QgsLabelingGui::QgsLabelingGui( QgsVectorLayer* layer, QgsMapCanvas* mapCanvas,
378380
<< mRepeatDistanceDDBtn
379381
<< mRepeatDistanceSpinBox
380382
<< mRepeatDistanceUnitDDBtn
383+
<< mRepeatDistanceUnitWidget
381384
<< mScaleBasedVisibilityChkBx
382385
<< mScaleBasedVisibilityDDBtn
383386
<< mScaleBasedVisibilityMaxDDBtn
@@ -396,10 +399,12 @@ QgsLabelingGui::QgsLabelingGui( QgsVectorLayer* layer, QgsMapCanvas* mapCanvas,
396399
<< mShadowOffsetGlobalChkBx
397400
<< mShadowOffsetSpnBx
398401
<< mShadowOffsetUnitsDDBtn
402+
<< mShadowOffsetUnitWidget
399403
<< mShadowRadiusAlphaChkBx
400404
<< mShadowRadiusDDBtn
401405
<< mShadowRadiusDblSpnBx
402406
<< mShadowRadiusUnitsDDBtn
407+
<< mShadowRadiusUnitWidget
403408
<< mShadowScaleDDBtn
404409
<< mShadowScaleSpnBx
405410
<< mShadowTranspDDBtn
@@ -413,6 +418,7 @@ QgsLabelingGui::QgsLabelingGui( QgsVectorLayer* layer, QgsMapCanvas* mapCanvas,
413418
<< mShapeBorderUnitsDDBtn
414419
<< mShapeBorderWidthDDBtn
415420
<< mShapeBorderWidthSpnBx
421+
<< mShapeBorderWidthUnitWidget
416422
<< mShapeDrawChkBx
417423
<< mShapeDrawDDBtn
418424
<< mShapeFillColorBtn
@@ -421,6 +427,7 @@ QgsLabelingGui::QgsLabelingGui( QgsVectorLayer* layer, QgsMapCanvas* mapCanvas,
421427
<< mShapeOffsetUnitsDDBtn
422428
<< mShapeOffsetXSpnBx
423429
<< mShapeOffsetYSpnBx
430+
<< mShapeOffsetUnitWidget
424431
<< mShapePenStyleCmbBx
425432
<< mShapePenStyleDDBtn
426433
<< mShapeRadiusDDBtn
@@ -431,11 +438,13 @@ QgsLabelingGui::QgsLabelingGui( QgsVectorLayer* layer, QgsMapCanvas* mapCanvas,
431438
<< mShapeRotationDDBtn
432439
<< mShapeRotationDblSpnBx
433440
<< mShapeRotationTypeDDBtn
441+
<< mShapeRadiusUnitWidget
434442
<< mShapeSVGPathDDBtn
435443
<< mShapeSVGPathLineEdit
436444
<< mShapeSizeCmbBx
437445
<< mShapeSizeTypeDDBtn
438446
<< mShapeSizeUnitsDDBtn
447+
<< mShapeSizeUnitWidget
439448
<< mShapeSizeXDDBtn
440449
<< mShapeSizeXSpnBx
441450
<< mShapeSizeYDDBtn
@@ -509,6 +518,10 @@ void QgsLabelingGui::connectValueChanged( QList<QWidget *> widgets, const char *
509518
{
510519
connect( w, SIGNAL( fieldChanged( QString ) ), this, slot );
511520
}
521+
else if ( QgsUnitSelectionWidget* w = qobject_cast<QgsUnitSelectionWidget*>( widget ) )
522+
{
523+
connect( w, SIGNAL( changed() ), this, slot );
524+
}
512525
else if ( QComboBox* w = qobject_cast<QComboBox*>( widget ) )
513526
{
514527
connect( w, SIGNAL( currentIndexChanged( int ) ), this, slot );

0 commit comments

Comments
 (0)
Please sign in to comment.