Skip to content

Commit

Permalink
Fix many labeling unit settings are lost on closing dialog
Browse files Browse the repository at this point in the history
(and also don't trigger auto preview)

(cherry-picked from dc48195)
  • Loading branch information
nyalldawson committed Oct 6, 2016
1 parent dea2927 commit 31dc608
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/app/qgslabelinggui.cpp
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -354,6 +354,7 @@ QgsLabelingGui::QgsLabelingGui( QgsVectorLayer* layer, QgsMapCanvas* mapCanvas,
<< mLineDistanceDDBtn << mLineDistanceDDBtn
<< mLineDistanceSpnBx << mLineDistanceSpnBx
<< mLineDistanceUnitDDBtn << mLineDistanceUnitDDBtn
<< mLineDistanceUnitWidget
<< mMaxCharAngleDDBtn << mMaxCharAngleDDBtn
<< mMaxCharAngleInDSpinBox << mMaxCharAngleInDSpinBox
<< mMaxCharAngleOutDSpinBox << mMaxCharAngleOutDSpinBox
Expand All @@ -367,6 +368,7 @@ QgsLabelingGui::QgsLabelingGui( QgsVectorLayer* layer, QgsMapCanvas* mapCanvas,
<< mPointAngleSpinBox << mPointAngleSpinBox
<< mPointOffsetDDBtn << mPointOffsetDDBtn
<< mPointOffsetUnitsDDBtn << mPointOffsetUnitsDDBtn
<< mPointOffsetUnitWidget
<< mPointOffsetXSpinBox << mPointOffsetXSpinBox
<< mPointOffsetYSpinBox << mPointOffsetYSpinBox
<< mPointPositionOrderDDBtn << mPointPositionOrderDDBtn
Expand All @@ -378,6 +380,7 @@ QgsLabelingGui::QgsLabelingGui( QgsVectorLayer* layer, QgsMapCanvas* mapCanvas,
<< mRepeatDistanceDDBtn << mRepeatDistanceDDBtn
<< mRepeatDistanceSpinBox << mRepeatDistanceSpinBox
<< mRepeatDistanceUnitDDBtn << mRepeatDistanceUnitDDBtn
<< mRepeatDistanceUnitWidget
<< mScaleBasedVisibilityChkBx << mScaleBasedVisibilityChkBx
<< mScaleBasedVisibilityDDBtn << mScaleBasedVisibilityDDBtn
<< mScaleBasedVisibilityMaxDDBtn << mScaleBasedVisibilityMaxDDBtn
Expand All @@ -396,10 +399,12 @@ QgsLabelingGui::QgsLabelingGui( QgsVectorLayer* layer, QgsMapCanvas* mapCanvas,
<< mShadowOffsetGlobalChkBx << mShadowOffsetGlobalChkBx
<< mShadowOffsetSpnBx << mShadowOffsetSpnBx
<< mShadowOffsetUnitsDDBtn << mShadowOffsetUnitsDDBtn
<< mShadowOffsetUnitWidget
<< mShadowRadiusAlphaChkBx << mShadowRadiusAlphaChkBx
<< mShadowRadiusDDBtn << mShadowRadiusDDBtn
<< mShadowRadiusDblSpnBx << mShadowRadiusDblSpnBx
<< mShadowRadiusUnitsDDBtn << mShadowRadiusUnitsDDBtn
<< mShadowRadiusUnitWidget
<< mShadowScaleDDBtn << mShadowScaleDDBtn
<< mShadowScaleSpnBx << mShadowScaleSpnBx
<< mShadowTranspDDBtn << mShadowTranspDDBtn
Expand All @@ -413,6 +418,7 @@ QgsLabelingGui::QgsLabelingGui( QgsVectorLayer* layer, QgsMapCanvas* mapCanvas,
<< mShapeBorderUnitsDDBtn << mShapeBorderUnitsDDBtn
<< mShapeBorderWidthDDBtn << mShapeBorderWidthDDBtn
<< mShapeBorderWidthSpnBx << mShapeBorderWidthSpnBx
<< mShapeBorderWidthUnitWidget
<< mShapeDrawChkBx << mShapeDrawChkBx
<< mShapeDrawDDBtn << mShapeDrawDDBtn
<< mShapeFillColorBtn << mShapeFillColorBtn
Expand All @@ -421,6 +427,7 @@ QgsLabelingGui::QgsLabelingGui( QgsVectorLayer* layer, QgsMapCanvas* mapCanvas,
<< mShapeOffsetUnitsDDBtn << mShapeOffsetUnitsDDBtn
<< mShapeOffsetXSpnBx << mShapeOffsetXSpnBx
<< mShapeOffsetYSpnBx << mShapeOffsetYSpnBx
<< mShapeOffsetUnitWidget
<< mShapePenStyleCmbBx << mShapePenStyleCmbBx
<< mShapePenStyleDDBtn << mShapePenStyleDDBtn
<< mShapeRadiusDDBtn << mShapeRadiusDDBtn
Expand All @@ -431,11 +438,13 @@ QgsLabelingGui::QgsLabelingGui( QgsVectorLayer* layer, QgsMapCanvas* mapCanvas,
<< mShapeRotationDDBtn << mShapeRotationDDBtn
<< mShapeRotationDblSpnBx << mShapeRotationDblSpnBx
<< mShapeRotationTypeDDBtn << mShapeRotationTypeDDBtn
<< mShapeRadiusUnitWidget
<< mShapeSVGPathDDBtn << mShapeSVGPathDDBtn
<< mShapeSVGPathLineEdit << mShapeSVGPathLineEdit
<< mShapeSizeCmbBx << mShapeSizeCmbBx
<< mShapeSizeTypeDDBtn << mShapeSizeTypeDDBtn
<< mShapeSizeUnitsDDBtn << mShapeSizeUnitsDDBtn
<< mShapeSizeUnitWidget
<< mShapeSizeXDDBtn << mShapeSizeXDDBtn
<< mShapeSizeXSpnBx << mShapeSizeXSpnBx
<< mShapeSizeYDDBtn << mShapeSizeYDDBtn
Expand Down Expand Up @@ -509,6 +518,10 @@ void QgsLabelingGui::connectValueChanged( QList<QWidget *> widgets, const char *
{ {
connect( w, SIGNAL( fieldChanged( QString ) ), this, slot ); connect( w, SIGNAL( fieldChanged( QString ) ), this, slot );
} }
else if ( QgsUnitSelectionWidget* w = qobject_cast<QgsUnitSelectionWidget*>( widget ) )
{
connect( w, SIGNAL( changed() ), this, slot );
}
else if ( QComboBox* w = qobject_cast<QComboBox*>( widget ) ) else if ( QComboBox* w = qobject_cast<QComboBox*>( widget ) )
{ {
connect( w, SIGNAL( currentIndexChanged( int ) ), this, slot ); connect( w, SIGNAL( currentIndexChanged( int ) ), this, slot );
Expand Down

0 comments on commit 31dc608

Please sign in to comment.