Skip to content

Commit

Permalink
External Resource Widget: avoid having undefined value in document vi…
Browse files Browse the repository at this point in the history
…ewer type combobox
  • Loading branch information
3nids committed Feb 22, 2016
1 parent d3852e4 commit 5b46f48
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/gui/editorwidgets/qgsexternalresourceconfigdlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,11 @@ void QgsExternalResourceConfigDlg::setConfig( const QgsEditorWidgetConfig& confi
{
QgsExternalResourceWidget::DocumentViewerContent content = ( QgsExternalResourceWidget::DocumentViewerContent )config.value( "DocumentViewer" ).toInt();
mDocumentViewerGroupBox->setChecked( content != QgsExternalResourceWidget::NoContent );
mDocumentViewerContentComboBox->setCurrentIndex( mDocumentViewerContentComboBox->findData( content ) );
int idx = mDocumentViewerContentComboBox->findData( content );
if ( idx >= 0 )
{
mDocumentViewerContentComboBox->setCurrentIndex( idx );
}
if ( config.contains( "DocumentViewerHeight" ) )
{
mDocumentViewerHeight->setValue( config.value( "DocumentViewerHeight" ).toInt() );
Expand Down

0 comments on commit 5b46f48

Please sign in to comment.