Skip to content

Commit

Permalink
Fix startup state of diagram option widgets
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn committed Aug 13, 2012
1 parent ca9d49b commit bd4a85a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/app/qgsvectorlayerproperties.cpp
Expand Up @@ -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 )
Expand Down Expand Up @@ -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
Expand All @@ -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.