Skip to content

Commit

Permalink
Disable options related to interpretation and threatment of above/bel…
Browse files Browse the repository at this point in the history
…ow line labeling when online labeling is requested.
  • Loading branch information
Sandro Santilli authored and wonder-sk committed Nov 8, 2011
1 parent 62ed7ef commit 627d25c
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/app/qgslabelinggui.cpp
Expand Up @@ -190,6 +190,8 @@ QgsLabelingGui::QgsLabelingGui( QgsPalLabeling* lbl, QgsVectorLayer* layer, QgsM
connect( chkBuffer, SIGNAL( toggled( bool ) ), this, SLOT( updateUi() ) );
connect( chkScaleBasedVisibility, SIGNAL( toggled( bool ) ), this, SLOT( updateUi() ) );
connect( chkFormattedNumbers, SIGNAL( toggled( bool ) ), this, SLOT( updateUi() ) );
connect( chkLineAbove, SIGNAL( toggled( bool ) ), this, SLOT( updateUi() ) );
connect( chkLineBelow, SIGNAL( toggled( bool ) ), this, SLOT( updateUi() ) );

// setup connection to changes in the placement
QRadioButton* placementRadios[] =
Expand Down Expand Up @@ -518,6 +520,9 @@ void QgsLabelingGui::updateUi()
spinScaleMax->setEnabled( scale );

spinDecimals->setEnabled( chkFormattedNumbers->isChecked() );

bool offline = chkLineAbove->isChecked() || chkLineBelow->isChecked();
offlineOptions->setEnabled ( offline );
}

void QgsLabelingGui::changeBufferColor()
Expand Down
10 changes: 10 additions & 0 deletions src/ui/qgslabelingguibase.ui
Expand Up @@ -821,6 +821,10 @@
</property>
</widget>
</item>

<item><widget class="QWidget" name="offlineOptions"><!-- { -->
<layout class="QVBoxLayout" name="offlineOptionsLayout">

<item>
<layout class="QHBoxLayout" name="horizontalLayout_13">
<item>
Expand Down Expand Up @@ -849,6 +853,7 @@
</item>
</layout>
</item>

<item>
<layout class="QHBoxLayout" name="horizontalLayout_14">
<item>
Expand Down Expand Up @@ -887,6 +892,11 @@
</item>
</layout>
</item>

</layout><!-- offlineOptionsLayout -->
</widget><!-- offlineOptions } -->
</item>

</layout>
</widget>
<widget class="QWidget" name="pageOptionsEmpty"/>
Expand Down

0 comments on commit 627d25c

Please sign in to comment.