Skip to content

Commit

Permalink
[styledock] reduce height of vector layer rendering section (#3268)
Browse files Browse the repository at this point in the history
  • Loading branch information
nirvn authored and NathanW2 committed Jul 4, 2016
1 parent 1a08f0a commit 0dc0f69
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 27 deletions.
8 changes: 0 additions & 8 deletions src/gui/symbology-ng/qgsrendererv2propertiesdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@ QgsRendererV2PropertiesDialog::QgsRendererV2PropertiesDialog( QgsVectorLayer* la

connect( cboRenderers, SIGNAL( currentIndexChanged( int ) ), this, SLOT( rendererChanged() ) );
connect( checkboxEnableOrderBy, SIGNAL( toggled( bool ) ), btnOrderBy, SLOT( setEnabled( bool ) ) );
connect( checkboxEnableOrderBy, SIGNAL( toggled( bool ) ), lineEditOrderBy, SLOT( setEnabled( bool ) ) );
connect( btnOrderBy, SIGNAL( clicked( bool ) ), this, SLOT( showOrderByDialog() ) );

syncToLayer();
Expand All @@ -127,7 +126,6 @@ QgsRendererV2PropertiesDialog::QgsRendererV2PropertiesDialog( QgsVectorLayer* la
widgets << mLayerTransparencySpnBx
<< cboRenderers
<< checkboxEnableOrderBy
<< lineEditOrderBy
<< mBlendModeComboBox
<< mFeatureBlendComboBox
<< mEffectWidget;
Expand Down Expand Up @@ -348,8 +346,6 @@ void QgsRendererV2PropertiesDialog::syncToLayer()
mOrderBy = mLayer->rendererV2()->orderBy();
}

lineEditOrderBy->setText( mOrderBy.dump() );

// setup slot rendererChanged()
//setup order by
if ( mLayer->rendererV2() &&
Expand All @@ -361,9 +357,7 @@ void QgsRendererV2PropertiesDialog::syncToLayer()
{
btnOrderBy->setEnabled( false );
checkboxEnableOrderBy->setChecked( false );
lineEditOrderBy->setEnabled( false );
}
lineEditOrderBy->setReadOnly( true );

if ( mLayer->rendererV2() )
{
Expand All @@ -387,14 +381,12 @@ void QgsRendererV2PropertiesDialog::showOrderByDialog()
if ( dlg.exec() )
{
mOrderBy = dlg.orderBy();
lineEditOrderBy->setText( mOrderBy.dump() );
}
}

void QgsRendererV2PropertiesDialog::changeOrderBy( const QgsFeatureRequest::OrderBy& orderBy, bool orderByEnabled )
{
mOrderBy = orderBy;
lineEditOrderBy->setText( mOrderBy.dump() );
checkboxEnableOrderBy->setChecked( orderByEnabled );
}

Expand Down
28 changes: 9 additions & 19 deletions src/ui/qgsrendererv2propsdialogbase.ui
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@
<widget class="QgsBlendModeComboBox" name="mBlendModeComboBox"/>
</item>
<item row="4" column="0" colspan="4">
<layout class="QVBoxLayout" name="verticalLayout_3">
<layout class="QHBoxLayout" name="horizontalLayout_3">
<item>
<widget class="QCheckBox" name="checkboxEnableOrderBy">
<property name="text">
Expand All @@ -172,25 +172,15 @@
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_3">
<property name="topMargin">
<number>0</number>
<widget class="QToolButton" name="btnOrderBy">
<property name="icon">
<iconset resource="../../images/images.qrc">
<normaloff>:/images/themes/default/sort.svg</normaloff>:/images/themes/default/sort.svg</iconset>
</property>
<item>
<widget class="QLineEdit" name="lineEditOrderBy">
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="btnOrderBy">
<property name="text">
<string>...</string>
</property>
</widget>
</item>
</layout>
<property name="text">
<string>...</string>
</property>
</widget>
</item>
</layout>
</item>
Expand Down

0 comments on commit 0dc0f69

Please sign in to comment.