diff --git a/src/app/composer/qgscomposeritemwidget.cpp b/src/app/composer/qgscomposeritemwidget.cpp
index c1244dedfd9b..c2300e3f7b82 100644
--- a/src/app/composer/qgscomposeritemwidget.cpp
+++ b/src/app/composer/qgscomposeritemwidget.cpp
@@ -108,7 +108,13 @@ QgsVectorLayer* QgsComposerItemBaseWidget::atlasCoverageLayer() const
//QgsComposerItemWidget
-QgsComposerItemWidget::QgsComposerItemWidget( QWidget* parent, QgsComposerItem* item ): QgsComposerItemBaseWidget( parent, item ), mItem( item )
+QgsComposerItemWidget::QgsComposerItemWidget( QWidget* parent, QgsComposerItem* item )
+ : QgsComposerItemBaseWidget( parent, item )
+ , mItem( item )
+ , mFreezeXPosSpin( false )
+ , mFreezeYPosSpin( false )
+ , mFreezeWidthSpin( false )
+ , mFreezeHeightSpin( false )
{
setupUi( this );
@@ -376,68 +382,88 @@ void QgsComposerItemWidget::setValuesForGuiPositionElements()
if ( mItem->lastUsedPositionMode() == QgsComposerItem::UpperLeft )
{
mUpperLeftCheckBox->setChecked( true );
- mXPosSpin->setValue( pos.x() );
- mYPosSpin->setValue( pos.y() );
+ if ( !mFreezeXPosSpin )
+ mXPosSpin->setValue( pos.x() );
+ if ( !mFreezeYPosSpin )
+ mYPosSpin->setValue( pos.y() );
}
if ( mItem->lastUsedPositionMode() == QgsComposerItem::UpperMiddle )
{
mUpperMiddleCheckBox->setChecked( true );
- mXPosSpin->setValue( pos.x() + mItem->rect().width() / 2.0 );
- mYPosSpin->setValue( pos.y() );
+ if ( !mFreezeXPosSpin )
+ mXPosSpin->setValue( pos.x() + mItem->rect().width() / 2.0 );
+ if ( !mFreezeYPosSpin )
+ mYPosSpin->setValue( pos.y() );
}
if ( mItem->lastUsedPositionMode() == QgsComposerItem::UpperRight )
{
mUpperRightCheckBox->setChecked( true );
- mXPosSpin->setValue( pos.x() + mItem->rect().width() );
- mYPosSpin->setValue( pos.y() );
+ if ( !mFreezeXPosSpin )
+ mXPosSpin->setValue( pos.x() + mItem->rect().width() );
+ if ( !mFreezeYPosSpin )
+ mYPosSpin->setValue( pos.y() );
}
if ( mItem->lastUsedPositionMode() == QgsComposerItem::MiddleLeft )
{
mMiddleLeftCheckBox->setChecked( true );
- mXPosSpin->setValue( pos.x() );
- mYPosSpin->setValue( pos.y() + mItem->rect().height() / 2.0 );
+ if ( !mFreezeXPosSpin )
+ mXPosSpin->setValue( pos.x() );
+ if ( !mFreezeYPosSpin )
+ mYPosSpin->setValue( pos.y() + mItem->rect().height() / 2.0 );
}
if ( mItem->lastUsedPositionMode() == QgsComposerItem::Middle )
{
mMiddleCheckBox->setChecked( true );
- mXPosSpin->setValue( pos.x() + mItem->rect().width() / 2.0 );
- mYPosSpin->setValue( pos.y() + mItem->rect().height() / 2.0 );
+ if ( !mFreezeXPosSpin )
+ mXPosSpin->setValue( pos.x() + mItem->rect().width() / 2.0 );
+ if ( !mFreezeYPosSpin )
+ mYPosSpin->setValue( pos.y() + mItem->rect().height() / 2.0 );
}
if ( mItem->lastUsedPositionMode() == QgsComposerItem::MiddleRight )
{
mMiddleRightCheckBox->setChecked( true );
- mXPosSpin->setValue( pos.x() + mItem->rect().width() );
- mYPosSpin->setValue( pos.y() + mItem->rect().height() / 2.0 );
+ if ( !mFreezeXPosSpin )
+ mXPosSpin->setValue( pos.x() + mItem->rect().width() );
+ if ( !mFreezeYPosSpin )
+ mYPosSpin->setValue( pos.y() + mItem->rect().height() / 2.0 );
}
if ( mItem->lastUsedPositionMode() == QgsComposerItem::LowerLeft )
{
mLowerLeftCheckBox->setChecked( true );
- mXPosSpin->setValue( pos.x() );
- mYPosSpin->setValue( pos.y() + mItem->rect().height() );
+ if ( !mFreezeXPosSpin )
+ mXPosSpin->setValue( pos.x() );
+ if ( !mFreezeYPosSpin )
+ mYPosSpin->setValue( pos.y() + mItem->rect().height() );
}
if ( mItem->lastUsedPositionMode() == QgsComposerItem::LowerMiddle )
{
mLowerMiddleCheckBox->setChecked( true );
- mXPosSpin->setValue( pos.x() + mItem->rect().width() / 2.0 );
- mYPosSpin->setValue( pos.y() + mItem->rect().height() );
+ if ( !mFreezeXPosSpin )
+ mXPosSpin->setValue( pos.x() + mItem->rect().width() / 2.0 );
+ if ( !mFreezeYPosSpin )
+ mYPosSpin->setValue( pos.y() + mItem->rect().height() );
}
if ( mItem->lastUsedPositionMode() == QgsComposerItem::LowerRight )
{
mLowerRightCheckBox->setChecked( true );
- mXPosSpin->setValue( pos.x() + mItem->rect().width() );
- mYPosSpin->setValue( pos.y() + mItem->rect().height() );
+ if ( !mFreezeXPosSpin )
+ mXPosSpin->setValue( pos.x() + mItem->rect().width() );
+ if ( !mFreezeYPosSpin )
+ mYPosSpin->setValue( pos.y() + mItem->rect().height() );
}
- mWidthSpin->setValue( mItem->rect().width() );
- mHeightSpin->setValue( mItem->rect().height() );
+ if ( !mFreezeWidthSpin )
+ mWidthSpin->setValue( mItem->rect().width() );
+ if ( !mFreezeHeightSpin )
+ mHeightSpin->setValue( mItem->rect().height() );
mPageSpinBox->setValue( mItem->page() );
mXPosSpin->blockSignals( false );
@@ -635,6 +661,34 @@ void QgsComposerItemWidget::on_mItemIdLineEdit_editingFinished()
}
}
+void QgsComposerItemWidget::on_mXPosSpin_valueChanged( double )
+{
+ mFreezeXPosSpin = true;
+ changeItemPosition();
+ mFreezeXPosSpin = false;
+}
+
+void QgsComposerItemWidget::on_mYPosSpin_valueChanged( double )
+{
+ mFreezeYPosSpin = true;
+ changeItemPosition();
+ mFreezeYPosSpin = false;
+}
+
+void QgsComposerItemWidget::on_mWidthSpin_valueChanged( double )
+{
+ mFreezeWidthSpin = true;
+ changeItemPosition();
+ mFreezeWidthSpin = false;
+}
+
+void QgsComposerItemWidget::on_mHeightSpin_valueChanged( double )
+{
+ mFreezeHeightSpin = true;
+ changeItemPosition();
+ mFreezeHeightSpin = false;
+}
+
void QgsComposerItemWidget::on_mUpperLeftCheckBox_stateChanged( int state )
{
if ( state != Qt::Checked )
diff --git a/src/app/composer/qgscomposeritemwidget.h b/src/app/composer/qgscomposeritemwidget.h
index fa699a0f215f..4fc10801f0e6 100644
--- a/src/app/composer/qgscomposeritemwidget.h
+++ b/src/app/composer/qgscomposeritemwidget.h
@@ -91,10 +91,10 @@ class QgsComposerItemWidget: public QgsComposerItemBaseWidget, private Ui::QgsCo
//adjust coordinates in line edits
void on_mPageSpinBox_valueChanged( int ) { changeItemPosition(); }
- void on_mXPosSpin_valueChanged( double ) { changeItemPosition(); }
- void on_mYPosSpin_valueChanged( double ) { changeItemPosition(); }
- void on_mWidthSpin_valueChanged( double ) { changeItemPosition(); }
- void on_mHeightSpin_valueChanged( double ) { changeItemPosition(); }
+ void on_mXPosSpin_valueChanged( double );
+ void on_mYPosSpin_valueChanged( double );
+ void on_mWidthSpin_valueChanged( double );
+ void on_mHeightSpin_valueChanged( double );
void on_mUpperLeftCheckBox_stateChanged( int state );
void on_mUpperMiddleCheckBox_stateChanged( int state );
@@ -130,6 +130,11 @@ class QgsComposerItemWidget: public QgsComposerItemBaseWidget, private Ui::QgsCo
QgsComposerItem* mItem;
+ bool mFreezeXPosSpin;
+ bool mFreezeYPosSpin;
+ bool mFreezeWidthSpin;
+ bool mFreezeHeightSpin;
+
// void changeItemTransparency( int value );
void changeItemPosition();
diff --git a/src/app/composer/qgscomposerlabelwidget.cpp b/src/app/composer/qgscomposerlabelwidget.cpp
index 1161da03c3f0..b3bd70e7af55 100644
--- a/src/app/composer/qgscomposerlabelwidget.cpp
+++ b/src/app/composer/qgscomposerlabelwidget.cpp
@@ -36,6 +36,9 @@ QgsComposerLabelWidget::QgsComposerLabelWidget( QgsComposerLabel* label ): QgsCo
mFontColorButton->setColorDialogTitle( tr( "Select font color" ) );
mFontColorButton->setContext( "composer" );
+ mMarginXDoubleSpinBox->setClearValue( 0.0 );
+ mMarginYDoubleSpinBox->setClearValue( 0.0 );
+
if ( mComposerLabel )
{
setGuiElementValues();
diff --git a/src/ui/qgscomposerarrowwidgetbase.ui b/src/ui/qgscomposerarrowwidgetbase.ui
index 911f8d2d3633..606596d72d65 100755
--- a/src/ui/qgscomposerarrowwidgetbase.ui
+++ b/src/ui/qgscomposerarrowwidgetbase.ui
@@ -188,13 +188,16 @@
-
-
+
mm
+
+ false
+
-
@@ -205,13 +208,16 @@
-
-
+
mm
+
+ false
+
-
@@ -266,18 +272,23 @@
-
- QgsCollapsibleGroupBoxBasic
- QGroupBox
-
- 1
-
QgsColorButtonV2
QToolButton
1
+
+ QgsDoubleSpinBox
+ QDoubleSpinBox
+
+
+
+ QgsCollapsibleGroupBoxBasic
+ QGroupBox
+
+ 1
+
scrollArea
diff --git a/src/ui/qgscomposerattributetablewidgetbase.ui b/src/ui/qgscomposerattributetablewidgetbase.ui
index c7765dda4d2a..f13208e314c4 100755
--- a/src/ui/qgscomposerattributetablewidgetbase.ui
+++ b/src/ui/qgscomposerattributetablewidgetbase.ui
@@ -45,9 +45,9 @@
0
- -400
+ 0
392
- 1192
+ 1204
@@ -260,10 +260,13 @@
-
-
+
mm
+
+ false
+
-
@@ -397,10 +400,13 @@
-
-
+
mm
+
+ false
+
-
@@ -705,22 +711,27 @@
-
- QgsCollapsibleGroupBoxBasic
- QGroupBox
-
- 1
-
QgsColorButtonV2
QToolButton
1
+
+ QgsDoubleSpinBox
+ QDoubleSpinBox
+
+
QgsMapLayerComboBox
QComboBox
-
+
+
+
+ QgsCollapsibleGroupBoxBasic
+ QGroupBox
+
+ 1
diff --git a/src/ui/qgscomposerhtmlwidgetbase.ui b/src/ui/qgscomposerhtmlwidgetbase.ui
index 5a352c33f4eb..3c1e3096d764 100755
--- a/src/ui/qgscomposerhtmlwidgetbase.ui
+++ b/src/ui/qgscomposerhtmlwidgetbase.ui
@@ -45,9 +45,9 @@
0
- -157
+ -155
391
- 517
+ 515
@@ -222,7 +222,7 @@
-
-
+
mm
@@ -235,6 +235,9 @@
1.000000000000000
+
+ false
+
@@ -278,17 +281,22 @@
+
+ QgsDataDefinedButton
+ QToolButton
+
+
+
+ QgsDoubleSpinBox
+ QDoubleSpinBox
+
+
QgsCollapsibleGroupBoxBasic
QGroupBox
1
-
- QgsDataDefinedButton
- QToolButton
-
-
scrollArea
diff --git a/src/ui/qgscomposeritemwidgetbase.ui b/src/ui/qgscomposeritemwidgetbase.ui
index e4fad38e9cb7..99493055a875 100755
--- a/src/ui/qgscomposeritemwidgetbase.ui
+++ b/src/ui/qgscomposeritemwidgetbase.ui
@@ -105,7 +105,7 @@
-
-
+
mm
@@ -115,10 +115,13 @@
9999999.000000000000000
+
+ false
+
-
-
+
mm
@@ -128,10 +131,13 @@
9999999.000000000000000
+
+ false
+
-
-
+
mm
@@ -144,10 +150,13 @@
9999999.000000000000000
+
+ false
+
-
-
+
mm
@@ -160,6 +169,9 @@
9999999.000000000000000
+
+ false
+
@@ -340,7 +352,7 @@
-
-
-
+
0
@@ -445,7 +457,7 @@
-
-
+
0
@@ -455,6 +467,9 @@
mm
+
+ false
+
-
@@ -687,9 +702,9 @@
- QgsCollapsibleGroupBoxBasic
- QGroupBox
-
+ QgsColorButtonV2
+ QToolButton
+
1
@@ -698,16 +713,21 @@
- QgsColorButtonV2
- QToolButton
-
- 1
+ QgsDoubleSpinBox
+ QDoubleSpinBox
+
QgsPenJoinStyleComboBox
QComboBox
+
+ QgsCollapsibleGroupBoxBasic
+ QGroupBox
+
+ 1
+
QgsBlendModeComboBox
QComboBox
diff --git a/src/ui/qgscomposerlabelwidgetbase.ui b/src/ui/qgscomposerlabelwidgetbase.ui
index 7f9fcbb28e55..3f30cda3a6b5 100755
--- a/src/ui/qgscomposerlabelwidgetbase.ui
+++ b/src/ui/qgscomposerlabelwidgetbase.ui
@@ -172,7 +172,7 @@
-
-
+
@@ -302,7 +302,7 @@
-
-
+
mm
@@ -341,6 +341,11 @@
1
+
+ QgsDoubleSpinBox
+ QDoubleSpinBox
+
+
scrollArea
diff --git a/src/ui/qgscomposerlegendwidgetbase.ui b/src/ui/qgscomposerlegendwidgetbase.ui
index 29050cbb7934..af0dd8e18521 100644
--- a/src/ui/qgscomposerlegendwidgetbase.ui
+++ b/src/ui/qgscomposerlegendwidgetbase.ui
@@ -54,9 +54,9 @@
0
- -319
+ 0
375
- 1291
+ 1273
@@ -586,13 +586,16 @@
-
-
+
mm
+
+ false
+
-
@@ -606,13 +609,16 @@
-
-
+
mm
+
+ false
+
@@ -650,7 +656,7 @@
-
-
+
@@ -660,6 +666,9 @@
9999.000000000000000
+
+ false
+
-
@@ -673,7 +682,7 @@
-
-
+
@@ -683,6 +692,9 @@
9999.000000000000000
+
+ false
+
@@ -723,7 +735,7 @@
-
-
+
@@ -746,7 +758,7 @@
-
-
+
@@ -769,7 +781,7 @@
-
-
+
@@ -792,7 +804,7 @@
-
-
+
@@ -812,7 +824,7 @@
-
-
+
@@ -829,7 +841,7 @@
-
-
+
@@ -849,7 +861,7 @@
-
-
+
Space below title.
@@ -869,18 +881,23 @@
-
- QgsCollapsibleGroupBoxBasic
- QGroupBox
-
- 1
-
QgsColorButtonV2
QToolButton
1
+
+ QgsDoubleSpinBox
+ QDoubleSpinBox
+
+
+
+ QgsCollapsibleGroupBoxBasic
+ QGroupBox
+
+ 1
+
QgsLayerTreeView
QTreeView
diff --git a/src/ui/qgscomposermapwidgetbase.ui b/src/ui/qgscomposermapwidgetbase.ui
index 7ed5ed76f0c7..1323845f939a 100755
--- a/src/ui/qgscomposermapwidgetbase.ui
+++ b/src/ui/qgscomposermapwidgetbase.ui
@@ -56,7 +56,7 @@
0
0
484
- 2469
+ 2454
@@ -140,7 +140,7 @@
-
-
-
+
°
@@ -613,7 +613,7 @@
-
-
-
+
X
@@ -626,7 +626,7 @@
-
-
+
Y
@@ -653,7 +653,7 @@
-
-
-
+
X
@@ -666,7 +666,7 @@
-
-
+
Y
@@ -691,13 +691,16 @@
-
-
+
mm
2
+
+ false
+
-
@@ -784,10 +787,13 @@
-
-
+
mm
+
+ false
+
-
@@ -921,10 +927,13 @@
-
-
+
mm
+
+ false
+
-
@@ -1114,7 +1123,7 @@
-
-
+
mm
@@ -1363,9 +1372,9 @@
- QgsBlendModeComboBox
- QComboBox
-
+ QgsDoubleSpinBox
+ QDoubleSpinBox
+
QgsCollapsibleGroupBoxBasic
@@ -1373,6 +1382,11 @@
1
+
+ QgsBlendModeComboBox
+ QComboBox
+
+
scrollArea
diff --git a/src/ui/qgscomposerpicturewidgetbase.ui b/src/ui/qgscomposerpicturewidgetbase.ui
index 68854384fc44..271bc6b09397 100755
--- a/src/ui/qgscomposerpicturewidgetbase.ui
+++ b/src/ui/qgscomposerpicturewidgetbase.ui
@@ -338,7 +338,7 @@
-
-
+
°
@@ -369,6 +369,11 @@
QToolButton
+
+ QgsDoubleSpinBox
+ QDoubleSpinBox
+
+
scrollArea
diff --git a/src/ui/qgscomposerscalebarwidgetbase.ui b/src/ui/qgscomposerscalebarwidgetbase.ui
index 56643e9e19f0..11e850b9effa 100755
--- a/src/ui/qgscomposerscalebarwidgetbase.ui
+++ b/src/ui/qgscomposerscalebarwidgetbase.ui
@@ -51,9 +51,9 @@
0
- -427
- 369
- 817
+ 0
+ 340
+ 823
@@ -165,13 +165,16 @@
-
-
+
6
9999999999999.000000000000000
+
+ false
+
-
@@ -240,7 +243,7 @@
-
-
+
units
@@ -250,6 +253,9 @@
9999999999999.000000000000000
+
+ false
+
-
@@ -295,7 +301,7 @@
-
-
+
@@ -312,7 +318,7 @@
-
-
+
@@ -329,7 +335,7 @@
-
-
+
0
@@ -351,6 +357,9 @@
0.200000000000000
+
+ false
+
-
@@ -597,18 +606,17 @@
-
- QgsCollapsibleGroupBoxBasic
- QGroupBox
-
- 1
-
QgsColorButtonV2
QToolButton
1
+
+ QgsDoubleSpinBox
+ QDoubleSpinBox
+
+
QgsPenJoinStyleComboBox
QComboBox
@@ -619,6 +627,12 @@
QComboBox
+
+ QgsCollapsibleGroupBoxBasic
+ QGroupBox
+
+ 1
+
scrollArea
diff --git a/src/ui/qgscomposershapewidgetbase.ui b/src/ui/qgscomposershapewidgetbase.ui
index dd8e76b5bea9..8127914613ff 100755
--- a/src/ui/qgscomposershapewidgetbase.ui
+++ b/src/ui/qgscomposershapewidgetbase.ui
@@ -74,7 +74,7 @@
-
-
+
0
@@ -128,6 +128,11 @@
1
+
+ QgsDoubleSpinBox
+ QDoubleSpinBox
+
+
groupBox
diff --git a/src/ui/qgscompositionwidgetbase.ui b/src/ui/qgscompositionwidgetbase.ui
index 8147e7f3f963..d3bcf24c7629 100755
--- a/src/ui/qgscompositionwidgetbase.ui
+++ b/src/ui/qgscompositionwidgetbase.ui
@@ -6,7 +6,7 @@
0
0
- 300
+ 345
506
@@ -51,8 +51,8 @@
0
0
- 284
- 599
+ 327
+ 591
@@ -121,7 +121,7 @@
-
-
-
+
0
@@ -137,6 +137,9 @@
99999.000000000000000
+
+ false
+
-
@@ -161,7 +164,7 @@
-
-
-
+
0
@@ -177,6 +180,9 @@
99999.000000000000000
+
+ false
+
-
@@ -381,7 +387,7 @@
-
-
+
@@ -394,6 +400,9 @@
9999.000000000000000
+
+ false
+
-
@@ -409,7 +418,7 @@
-
-
-
+
x:
@@ -422,13 +431,16 @@
-
-
+
y:
mm
+
+ 9999.000000000000000
+
@@ -474,17 +486,22 @@
+
+ QgsDataDefinedButton
+ QToolButton
+
+
+
+ QgsDoubleSpinBox
+ QDoubleSpinBox
+
+
QgsCollapsibleGroupBoxBasic
QGroupBox
1
-
- QgsDataDefinedButton
- QToolButton
-
-
scrollArea