mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-28 00:17:30 -05:00
Reorder label modes combo box
This commit is contained in:
parent
04caab24a7
commit
8bd92fb80f
@ -44,7 +44,7 @@ void QgsLabelingWidget::adaptToLayer()
|
||||
// pick the right mode of the layer
|
||||
if ( mLayer->labeling() && mLayer->labeling()->type() == "rule-based" )
|
||||
{
|
||||
mLabelModeComboBox->setCurrentIndex( 3 );
|
||||
mLabelModeComboBox->setCurrentIndex( 2 );
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -59,14 +59,14 @@ void QgsLabelingWidget::adaptToLayer()
|
||||
}
|
||||
else
|
||||
{
|
||||
mLabelModeComboBox->setCurrentIndex( lyr.drawLabels ? 1 : 2 );
|
||||
mLabelModeComboBox->setCurrentIndex( lyr.drawLabels ? 1 : 3 );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void QgsLabelingWidget::writeSettingsToLayer()
|
||||
{
|
||||
if ( mLabelModeComboBox->currentIndex() == 3 )
|
||||
if ( mLabelModeComboBox->currentIndex() == 2 )
|
||||
{
|
||||
qobject_cast<QgsRuleBasedLabelingWidget*>( mWidget )->writeSettingsToLayer();
|
||||
}
|
||||
@ -92,7 +92,7 @@ void QgsLabelingWidget::labelModeChanged( int index )
|
||||
if ( index < 0 )
|
||||
return;
|
||||
|
||||
if ( index < 3 )
|
||||
if ( index != 2 )
|
||||
{
|
||||
if ( QgsLabelingGui* widgetSimple = qobject_cast<QgsLabelingGui*>( mWidget ) )
|
||||
{
|
||||
@ -110,7 +110,7 @@ void QgsLabelingWidget::labelModeChanged( int index )
|
||||
delete mWidget;
|
||||
mWidget = nullptr;
|
||||
|
||||
if ( index == 3 )
|
||||
if ( index == 2 )
|
||||
{
|
||||
mWidget = new QgsRuleBasedLabelingWidget( mLayer, mCanvas, this );
|
||||
}
|
||||
|
@ -35,11 +35,6 @@
|
||||
<normaloff>:/images/themes/default/propertyicons/labels.svg</normaloff>:/images/themes/default/propertyicons/labels.svg</iconset>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Discourage other labels from covering features in this layer</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Rule-based labeling</string>
|
||||
@ -49,6 +44,11 @@
|
||||
<normaloff>:/images/themes/default/propertyicons/labels.svg</normaloff>:/images/themes/default/propertyicons/labels.svg</iconset>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Discourage other labels from covering features in this layer</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
|
Loading…
x
Reference in New Issue
Block a user