Skip to content

Commit

Permalink
Merge branch 'master' of github.com:qgis/Quantum-GIS
Browse files Browse the repository at this point in the history
  • Loading branch information
timlinux committed Oct 31, 2011
2 parents e9ee865 + 50f20c2 commit 900011b
Show file tree
Hide file tree
Showing 38 changed files with 1,467 additions and 1,258 deletions.
4 changes: 2 additions & 2 deletions debian/changelog
Expand Up @@ -10,9 +10,9 @@ qgis (1.8.0) UNRELEASED; urgency=low
* drop abi postfix from sqlanywhere plugin
* include network analysis library
* build package with libspatialindex where available
* drop wfsplugin
* drop wfsplugin & displaceplugin

-- Jürgen E. Fischer <jef@norbit.de> Sat, 08 Oct 2011 20:03:51 +0000
-- Jürgen E. Fischer <jef@norbit.de> Fri, 28 Oct 2011 08:52:45 +0200

qgis (1.7.0) UNRELEASED; urgency=low

Expand Down
1 change: 0 additions & 1 deletion debian/qgis.install
Expand Up @@ -10,7 +10,6 @@ usr/lib/qgis/plugins/libdiagramoverlay.so
usr/lib/qgis/plugins/libevis.so
usr/lib/qgis/plugins/librasterterrainplugin.so
usr/lib/qgis/plugins/libspatialqueryplugin.so
usr/lib/qgis/plugins/libdisplacementplugin.so
usr/lib/qgis/plugins/libofflineeditingplugin.so
usr/lib/qgis/plugins/libroadgraphplugin.so
usr/lib/qgis/plugins/libzonalstatisticsplugin.so
Expand Down
4 changes: 0 additions & 4 deletions src/app/CMakeLists.txt
Expand Up @@ -321,16 +321,12 @@ ENDIF (POSTGRES_FOUND)

IF (HAVE_SPATIALITE)
SET (QGIS_APP_SRCS ${QGIS_APP_SRCS}
spatialite/qgsspatialitesourceselect.cpp
spatialite/qgsnewspatialitelayerdialog.cpp
spatialite/qgsspatialitesridsdialog.cpp
spatialite/qgsspatialitetablemodel.cpp
)
SET (QGIS_APP_MOC_HDRS ${QGIS_APP_MOC_HDRS}
spatialite/qgsspatialitesourceselect.h
spatialite/qgsnewspatialitelayerdialog.h
spatialite/qgsspatialitesridsdialog.h
spatialite/qgsspatialitetablemodel.h
)
ENDIF (HAVE_SPATIALITE)

Expand Down
9 changes: 7 additions & 2 deletions src/app/legend/qgslegend.cpp
Expand Up @@ -1752,7 +1752,12 @@ void QgsLegend::refreshLayerSymbology( QString key, bool expandItem )
}

//store the current item
QModelIndex currentItemIndex( currentIndex() );
QTreeWidgetItem* current = currentItem();
// in case the current item is a child of the layer, use the layer as current item
// because otherwise we would set an invalid item as current item
// (in refreshSymbology the symbology items are removed and new ones are added)
if ( current && current->parent() == theLegendLayer )
current = current->parent();

double widthScale = 1.0;
if ( mMapCanvas && mMapCanvas->map() )
Expand All @@ -1763,7 +1768,7 @@ void QgsLegend::refreshLayerSymbology( QString key, bool expandItem )
theLegendLayer->refreshSymbology( key, widthScale );

//restore the current item again
setCurrentIndex( currentItemIndex );
setCurrentItem( current );
adjustIconSize();
setItemExpanded( theLegendLayer, expandItem );//make sure the symbology items are visible
}
Expand Down
62 changes: 8 additions & 54 deletions src/app/qgisapp.cpp
Expand Up @@ -241,7 +241,6 @@ extern "C"
{
#include <spatialite.h>
}
#include "spatialite/qgsspatialitesourceselect.h"
#include "spatialite/qgsnewspatialitelayerdialog.h"
#endif

Expand Down Expand Up @@ -327,7 +326,7 @@ static void customSrsValidation_( QgsCoordinateReferenceSystem* srs )
{
static QString authid = QString::null;
QSettings mySettings;
QString myDefaultProjectionOption = mySettings.value( "/Projections/defaultBehaviour" ).toString();
QString myDefaultProjectionOption = mySettings.value( "/Projections/defaultBehaviour", "prompt" ).toString();
if ( myDefaultProjectionOption == "prompt" )
{
//@note this class is not a descendent of QWidget so we cant pass
Expand Down Expand Up @@ -2346,62 +2345,17 @@ void QgisApp::addSpatiaLiteLayer()
}

// show the SpatiaLite dialog

QgsSpatiaLiteSourceSelect *dbs = new QgsSpatiaLiteSourceSelect( this );

mMapCanvas->freeze();

if ( dbs->exec() )
QDialog *dbs = dynamic_cast<QDialog*>( QgsProviderRegistry::instance()->selectWidget( QString( "spatialite" ), this ) );
if ( !dbs )
{
// Let render() do its own cursor management
// QApplication::setOverrideCursor(Qt::WaitCursor);


// repaint the canvas if it was covered by the dialog

// add files to the map canvas
QStringList tables = dbs->selectedTables();

QApplication::setOverrideCursor( Qt::WaitCursor );

// for each selected table, connect to the database and build a canvasitem for it
QStringList::Iterator it = tables.begin();
while ( it != tables.end() )
{
// create the layer
QgsDataSourceURI uri( *it );
QgsVectorLayer *layer = new QgsVectorLayer( uri.uri(), uri.table(), "spatialite" );
if ( layer->isValid() )
{
// register this layer with the central layers registry
QgsMapLayerRegistry::instance()->addMapLayer( layer );
}
else
{
QgsDebugMsg(( *it ) + " is an invalid layer - not loaded" );
QMessageBox::critical( this, tr( "Invalid Layer" ), tr( "%1 is an invalid layer and cannot be loaded." ).arg( *it ) );
delete layer;
}
//qWarning("incrementing iterator");
++it;
}

QApplication::restoreOverrideCursor();

statusBar()->showMessage( mMapCanvas->extent().toString( 2 ) );
QMessageBox::warning( this, tr( "SpatiaLite" ), tr( "Cannot get SpatiaLite select dialog from provider." ) );
return;
}
connect( dbs , SIGNAL( addDatabaseLayers( QStringList const &, QString const & ) ),
this , SLOT( addDatabaseLayers( QStringList const &, QString const & ) ) );
dbs->exec();
delete dbs;

// update UI
qApp->processEvents();

// draw the map
mMapCanvas->freeze( false );
mMapCanvas->refresh();

// Let render() do its own cursor management
// QApplication::restoreOverrideCursor();

} // QgisApp::addSpatiaLiteLayer()
#endif

Expand Down
4 changes: 2 additions & 2 deletions src/app/qgsoptions.cpp
Expand Up @@ -177,11 +177,11 @@ QgsOptions::QgsOptions( QWidget *parent, Qt::WFlags fl ) :
// set the display update threshold
spinBoxUpdateThreshold->setValue( settings.value( "/Map/updateThreshold" ).toInt() );
//set the default projection behaviour radio buttongs
if ( settings.value( "/Projections/defaultBehaviour" ).toString() == "prompt" )
if ( settings.value( "/Projections/defaultBehaviour", "prompt" ).toString() == "prompt" )
{
radPromptForProjection->setChecked( true );
}
else if ( settings.value( "/Projections/defaultBehaviour" ).toString() == "useProject" )
else if ( settings.value( "/Projections/defaultBehaviour", "prompt" ).toString() == "useProject" )
{
radUseProjectProjection->setChecked( true );
}
Expand Down

0 comments on commit 900011b

Please sign in to comment.