Navigation Menu

Skip to content

Commit

Permalink
Fixed gdal driver (de)selection feature that had some outstanding issues
Browse files Browse the repository at this point in the history
  • Loading branch information
timlinux committed Sep 13, 2011
1 parent 4a98963 commit 9076461
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 9 deletions.
6 changes: 3 additions & 3 deletions src/app/qgscustomization.cpp
Expand Up @@ -797,7 +797,7 @@ void QgsCustomization::customizeWidget( QString thePath, QWidget * theWidget )
QString p = myPath + "/" + w->objectName();

bool on = mySettings.value( p, true ).toBool();
QgsDebugMsg( QString( "p = %1 on = %2" ).arg( p ).arg( on ) );
//QgsDebugMsg( QString( "p = %1 on = %2" ).arg( p ).arg( on ) );
if ( on )
{
QgsCustomization::customizeWidget( myPath, w );
Expand Down Expand Up @@ -854,7 +854,7 @@ void QgsCustomization::preNotify( QObject * receiver, QEvent * event, bool * don
}
else if ( widget && event->type() == QEvent::MouseButtonPress )
{
QgsDebugMsg( "click" );
//QgsDebugMsg( "click" );
if ( pDialog && pDialog->isVisible() )
{
QMouseEvent *e = static_cast<QMouseEvent*>( event );
Expand All @@ -870,7 +870,7 @@ void QgsCustomization::preNotify( QObject * receiver, QEvent * event, bool * don
if ( pDialog && pDialog->isVisible() )
{
QKeyEvent *e = static_cast<QKeyEvent*>( event );
QgsDebugMsg( QString( "key = %1 modifiers = %2" ).arg( e->key() ).arg( e->modifiers() ) ) ;
//QgsDebugMsg( QString( "key = %1 modifiers = %2" ).arg( e->key() ).arg( e->modifiers() ) ) ;
if ( e->key() == Qt::Key_M && e->modifiers() == Qt::ControlModifier )
{
pDialog->setCatch( !pDialog->catchOn() );
Expand Down
3 changes: 1 addition & 2 deletions src/core/qgsapplication.cpp
Expand Up @@ -745,6 +745,5 @@ void QgsApplication::applyGdalSkippedDrivers()
QgsDebugMsg( "Gdal Skipped driver list set to:" );
QgsDebugMsg( myDriverList );
CPLSetConfigOption("GDAL_SKIP", myDriverList.toUtf8());
GDALDriverManager myDriverManager;
myDriverManager.AutoSkipDrivers();
GetGDALDriverManager()->AutoSkipDrivers();
}
15 changes: 11 additions & 4 deletions src/providers/gdal/qgsgdalprovider.cpp
Expand Up @@ -1181,12 +1181,19 @@ int QgsGdalProvider::colorInterpretation( int theBandNo ) const

void QgsGdalProvider::registerGdalDrivers()
{
if ( GDALGetDriverCount() == 0 )
//GDALDestroyDriverManager();
GDALAllRegister();
QSettings mySettings;
QString myJoinedList = mySettings.value( "gdal/skipList", "" ).toString();
if ( !myJoinedList.isEmpty() )
{
GDALAllRegister();
QStringList myList = myJoinedList.split(" ");
for ( int i = 0; i < myList.size(); ++i )
{
QgsApplication::skipGdalDriver( myList.at( i ) );
}
QgsApplication::applyGdalSkippedDrivers();
}
//call regardless of above
QgsApplication::applyGdalSkippedDrivers();
}


Expand Down

0 comments on commit 9076461

Please sign in to comment.