Skip to content
Permalink
Browse files

Fixed gdal driver (de)selection feature that had some outstanding issues

  • Loading branch information
timlinux committed Sep 13, 2011
1 parent 4a98963 commit 907646164c2ba82097811b456f0e0925bd43d58c
Showing with 15 additions and 9 deletions.
  1. +3 −3 src/app/qgscustomization.cpp
  2. +1 −2 src/core/qgsapplication.cpp
  3. +11 −4 src/providers/gdal/qgsgdalprovider.cpp
@@ -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 );
@@ -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 );
@@ -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() );
@@ -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();
}
@@ -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();
}


0 comments on commit 9076461

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