Skip to content

Commit 9076461

Browse files
committedSep 13, 2011
Fixed gdal driver (de)selection feature that had some outstanding issues
1 parent 4a98963 commit 9076461

File tree

3 files changed

+15
-9
lines changed

3 files changed

+15
-9
lines changed
 

‎src/app/qgscustomization.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -797,7 +797,7 @@ void QgsCustomization::customizeWidget( QString thePath, QWidget * theWidget )
797797
QString p = myPath + "/" + w->objectName();
798798

799799
bool on = mySettings.value( p, true ).toBool();
800-
QgsDebugMsg( QString( "p = %1 on = %2" ).arg( p ).arg( on ) );
800+
//QgsDebugMsg( QString( "p = %1 on = %2" ).arg( p ).arg( on ) );
801801
if ( on )
802802
{
803803
QgsCustomization::customizeWidget( myPath, w );
@@ -854,7 +854,7 @@ void QgsCustomization::preNotify( QObject * receiver, QEvent * event, bool * don
854854
}
855855
else if ( widget && event->type() == QEvent::MouseButtonPress )
856856
{
857-
QgsDebugMsg( "click" );
857+
//QgsDebugMsg( "click" );
858858
if ( pDialog && pDialog->isVisible() )
859859
{
860860
QMouseEvent *e = static_cast<QMouseEvent*>( event );
@@ -870,7 +870,7 @@ void QgsCustomization::preNotify( QObject * receiver, QEvent * event, bool * don
870870
if ( pDialog && pDialog->isVisible() )
871871
{
872872
QKeyEvent *e = static_cast<QKeyEvent*>( event );
873-
QgsDebugMsg( QString( "key = %1 modifiers = %2" ).arg( e->key() ).arg( e->modifiers() ) ) ;
873+
//QgsDebugMsg( QString( "key = %1 modifiers = %2" ).arg( e->key() ).arg( e->modifiers() ) ) ;
874874
if ( e->key() == Qt::Key_M && e->modifiers() == Qt::ControlModifier )
875875
{
876876
pDialog->setCatch( !pDialog->catchOn() );

‎src/core/qgsapplication.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -745,6 +745,5 @@ void QgsApplication::applyGdalSkippedDrivers()
745745
QgsDebugMsg( "Gdal Skipped driver list set to:" );
746746
QgsDebugMsg( myDriverList );
747747
CPLSetConfigOption("GDAL_SKIP", myDriverList.toUtf8());
748-
GDALDriverManager myDriverManager;
749-
myDriverManager.AutoSkipDrivers();
748+
GetGDALDriverManager()->AutoSkipDrivers();
750749
}

‎src/providers/gdal/qgsgdalprovider.cpp

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1181,12 +1181,19 @@ int QgsGdalProvider::colorInterpretation( int theBandNo ) const
11811181

11821182
void QgsGdalProvider::registerGdalDrivers()
11831183
{
1184-
if ( GDALGetDriverCount() == 0 )
1184+
//GDALDestroyDriverManager();
1185+
GDALAllRegister();
1186+
QSettings mySettings;
1187+
QString myJoinedList = mySettings.value( "gdal/skipList", "" ).toString();
1188+
if ( !myJoinedList.isEmpty() )
11851189
{
1186-
GDALAllRegister();
1190+
QStringList myList = myJoinedList.split(" ");
1191+
for ( int i = 0; i < myList.size(); ++i )
1192+
{
1193+
QgsApplication::skipGdalDriver( myList.at( i ) );
1194+
}
1195+
QgsApplication::applyGdalSkippedDrivers();
11871196
}
1188-
//call regardless of above
1189-
QgsApplication::applyGdalSkippedDrivers();
11901197
}
11911198

11921199

0 commit comments

Comments
 (0)
Please sign in to comment.