Skip to content

Commit bd4a85a

Browse files
committedAug 13, 2012
Fix startup state of diagram option widgets
1 parent ca9d49b commit bd4a85a

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed
 

‎src/app/qgsvectorlayerproperties.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1377,11 +1377,13 @@ void QgsVectorLayerProperties::handleDiagramTypeChanged( const QString& itemtext
13771377
{
13781378
mDiagramOptionsGroupBox->show();
13791379
mBarWidthLabel->show();
1380+
mBarWidthSpinBox->show();
13801381
}
13811382
else
13821383
{
13831384
mDiagramOptionsGroupBox->hide();
13841385
mBarWidthLabel->hide();
1386+
mBarWidthSpinBox->hide();
13851387
}
13861388

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

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

1885+
// Trigger a clicked event, so all the items get properly enabled and disabled
1886+
on_mDisplayDiagramsCheckBox_stateChanged( mDisplayDiagramsCheckBox->checkState() );
1887+
18831888
connect( mDiagramAttributesTreeWidget, SIGNAL( itemDoubleClicked( QTreeWidgetItem*, int ) ), this, SLOT( handleDiagramItemDoubleClick( QTreeWidgetItem*, int ) ) );
18841889
connect( mDiagramTypeComboBox, SIGNAL( currentIndexChanged( const QString& ) ), this, SLOT( handleDiagramTypeChanged( const QString& ) ) );
18851890
}

0 commit comments

Comments
 (0)
Please sign in to comment.