File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -207,7 +207,11 @@ void QgsExternalResourceConfigDlg::setConfig( const QgsEditorWidgetConfig& confi
207207 {
208208 QgsExternalResourceWidget::DocumentViewerContent content = ( QgsExternalResourceWidget::DocumentViewerContent )config.value ( " DocumentViewer" ).toInt ();
209209 mDocumentViewerGroupBox ->setChecked ( content != QgsExternalResourceWidget::NoContent );
210- mDocumentViewerContentComboBox ->setCurrentIndex ( mDocumentViewerContentComboBox ->findData ( content ) );
210+ int idx = mDocumentViewerContentComboBox ->findData ( content );
211+ if ( idx >= 0 )
212+ {
213+ mDocumentViewerContentComboBox ->setCurrentIndex ( idx );
214+ }
211215 if ( config.contains ( " DocumentViewerHeight" ) )
212216 {
213217 mDocumentViewerHeight ->setValue ( config.value ( " DocumentViewerHeight" ).toInt () );
You can’t perform that action at this time.
0 commit comments