Skip to content
Permalink
Browse files

- Line options only shown when available

- Default value for text diagram => label placment option
-
  • Loading branch information
m-kuhn committed Aug 14, 2012
1 parent 4f9e623 commit 1009c74f6270c0d198c51e6898a61875f5760a35
Showing with 9 additions and 6 deletions.
  1. +6 −6 src/app/qgsdiagramproperties.cpp
  2. +3 −0 src/ui/qgsdiagrampropertiesbase.ui
@@ -83,8 +83,8 @@ QgsDiagramProperties::QgsDiagramProperties( QgsVectorLayer* layer, QWidget* pare
}
else
{
mLineOptionsComboBox->setEnabled( false );
mLineOptionsLabel->setEnabled( false );
mLineOptionsComboBox->setVisible( false );
mLineOptionsLabel->setVisible( false );
}

mDiagramTypeComboBox->addItem( tr( "Pie chart" ) );
@@ -255,9 +255,9 @@ QgsDiagramProperties::QgsDiagramProperties( QgsVectorLayer* layer, QWidget* pare
mPrioritySlider->setValue( dls->priority );
mDataDefinedXComboBox->setCurrentIndex( mDataDefinedXComboBox->findData( dls->xPosColumn ) );
mDataDefinedYComboBox->setCurrentIndex( mDataDefinedYComboBox->findData( dls->yPosColumn ) );
if ( dls->xPosColumn == -1 && dls->yPosColumn == -1 )
if ( dls->xPosColumn != -1 || dls->yPosColumn != -1 )
{
mDataDefinedPositionGroupBox->setChecked( false );
mDataDefinedPositionGroupBox->setChecked( true );
}
mPlacementComboBox->setCurrentIndex( mPlacementComboBox->findData( dls->placement ) );
mLineOptionsComboBox->setCurrentIndex( mLineOptionsComboBox->findData( dls->placementFlags ) );
@@ -455,7 +455,7 @@ void QgsDiagramProperties::apply()
if ( 0 == mDiagramAttributesTreeWidget->topLevelItemCount() )
{
QMessageBox::warning( this, tr( "No attributes added." ),
tr( "You did not add any attributes to this diagram layer. Please specify the attributes to show on the diagrams." ), QMessageBox::Ok );
tr( "You did not add any attributes to this diagram layer. Please specify the attributes to visualize on the diagrams or disable diagrams." ), QMessageBox::Ok );
}

QgsDiagram* diagram = 0;
@@ -497,7 +497,7 @@ void QgsDiagramProperties::apply()
{
ds.labelPlacementMethod = QgsDiagramSettings::Height;
}
else if ( tr( "x-height" ) == mLabelPlacementComboBox->currentText() )
else
{
ds.labelPlacementMethod = QgsDiagramSettings::XHeight;
}
@@ -529,6 +529,9 @@
<property name="checkable">
<bool>true</bool>
</property>
<property name="checked">
<bool>false</bool>
</property>
<layout class="QGridLayout" name="gridLayout_5">
<item row="0" column="0" rowspan="2" colspan="3">
<widget class="QLabel" name="mXPosColLabel">

0 comments on commit 1009c74

Please sign in to comment.
You can’t perform that action at this time.