Skip to content
Permalink
Browse files

Fix startup state of diagram option widgets

  • Loading branch information
m-kuhn committed Aug 13, 2012
1 parent ca9d49b commit bd4a85ac16806f6714a2f7979fe2eb2474988ce2
Showing with 6 additions and 1 deletion.
  1. +6 −1 src/app/qgsvectorlayerproperties.cpp
@@ -1377,11 +1377,13 @@ void QgsVectorLayerProperties::handleDiagramTypeChanged( const QString& itemtext
{
mDiagramOptionsGroupBox->show();
mBarWidthLabel->show();
mBarWidthSpinBox->show();
}
else
{
mDiagramOptionsGroupBox->hide();
mBarWidthLabel->hide();
mBarWidthSpinBox->hide();
}

if ( tr( "Text diagram" ) == itemtext || tr( "Pie chart" ) == itemtext )
@@ -1871,7 +1873,7 @@ void QgsVectorLayerProperties::initDiagramTab()
mDiagramTypeComboBox->setCurrentIndex( mDiagramTypeComboBox->findText( tr( "Histogram" ) ) );
}
}
} // if ( !dr ), else
} // if ( !dr )

// Popuplate the widget list with all widgets which should be enabled/disabled when diagrams are
// enabled / disabled
@@ -1880,6 +1882,9 @@ void QgsVectorLayerProperties::initDiagramTab()
<< mPlacementGroupBox << mAttributesLabel << mDiagramAttributesComboBox << mRemoveCategoryPushButton
<< mAddCategoryPushButton << mDiagramAttributesTreeWidget << mDiagramOptionsGroupBox;

// Trigger a clicked event, so all the items get properly enabled and disabled
on_mDisplayDiagramsCheckBox_stateChanged( mDisplayDiagramsCheckBox->checkState() );

connect( mDiagramAttributesTreeWidget, SIGNAL( itemDoubleClicked( QTreeWidgetItem*, int ) ), this, SLOT( handleDiagramItemDoubleClick( QTreeWidgetItem*, int ) ) );
connect( mDiagramTypeComboBox, SIGNAL( currentIndexChanged( const QString& ) ), this, SLOT( handleDiagramTypeChanged( const QString& ) ) );
}

0 comments on commit bd4a85a

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