Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix collapsed state and raster prefix
  • Loading branch information
elpaso committed Apr 21, 2023
1 parent 985621b commit ef55b38
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/gui/providers/gdal/qgsgdalsourceselect.cpp
Expand Up @@ -32,6 +32,8 @@ QgsGdalSourceSelect::QgsGdalSourceSelect( QWidget *parent, Qt::WindowFlags fl, Q
setupUi( this );
setupButtons( buttonBox );

mOpenOptionsGroupBox->setCollapsed( false );

connect( radioSrcFile, &QRadioButton::toggled, this, &QgsGdalSourceSelect::radioSrcFile_toggled );
connect( radioSrcOgcApi, &QRadioButton::toggled, this, &QgsGdalSourceSelect::radioSrcOgcApi_toggled );
connect( radioSrcProtocol, &QRadioButton::toggled, this, &QgsGdalSourceSelect::radioSrcProtocol_toggled );
Expand Down Expand Up @@ -145,6 +147,10 @@ void QgsGdalSourceSelect::radioSrcOgcApi_toggled( bool checked )
{
const QString vectorPath = mFileWidget->filePath();
emit enableButtons( ! vectorPath.isEmpty() );
if ( mRasterPath.isEmpty() )
{
mRasterPath = QStringLiteral( "OGCAPI:" );
}
fillOpenOptions();
}
}
Expand Down Expand Up @@ -436,6 +442,7 @@ void QgsGdalSourceSelect::fillOpenOptions()
}

mOpenOptionsGroupBox->setVisible( !mOpenOptionsWidgets.empty() );

}

///@endcond
2 changes: 2 additions & 0 deletions src/gui/providers/ogr/qgsogrsourceselect.cpp
Expand Up @@ -42,6 +42,8 @@ QgsOgrSourceSelect::QgsOgrSourceSelect( QWidget *parent, Qt::WindowFlags fl, Qgs
setupUi( this );
QgsGui::enableAutoGeometryRestore( this );

mOpenOptionsGroupBox->setCollapsed( false );

connect( radioSrcFile, &QRadioButton::toggled, this, &QgsOgrSourceSelect::radioSrcFile_toggled );
connect( radioSrcOgcApi, &QRadioButton::toggled, this, &QgsOgrSourceSelect::radioSrcOgcApi_toggled );
connect( radioSrcDirectory, &QRadioButton::toggled, this, &QgsOgrSourceSelect::radioSrcDirectory_toggled );
Expand Down

0 comments on commit ef55b38

Please sign in to comment.