Skip to content
Permalink
Browse files

External Resource Widget: avoid having undefined value in document vi…

…ewer type combobox
  • Loading branch information
3nids committed Feb 22, 2016
1 parent d3852e4 commit 5b46f487ac21fc0a5c5a503b9ca21ef272a16a95
Showing with 5 additions and 1 deletion.
  1. +5 −1 src/gui/editorwidgets/qgsexternalresourceconfigdlg.cpp
@@ -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() );

0 comments on commit 5b46f48

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