Skip to content

Commit 900011b

Browse files
committed
Merge branch 'master' of github.com:qgis/Quantum-GIS
2 parents e9ee865 + 50f20c2 commit 900011b

38 files changed

+1467
-1258
lines changed

debian/changelog

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ qgis (1.8.0) UNRELEASED; urgency=low
1010
* drop abi postfix from sqlanywhere plugin
1111
* include network analysis library
1212
* build package with libspatialindex where available
13-
* drop wfsplugin
13+
* drop wfsplugin & displaceplugin
1414

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

1717
qgis (1.7.0) UNRELEASED; urgency=low
1818

debian/qgis.install

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ usr/lib/qgis/plugins/libdiagramoverlay.so
1010
usr/lib/qgis/plugins/libevis.so
1111
usr/lib/qgis/plugins/librasterterrainplugin.so
1212
usr/lib/qgis/plugins/libspatialqueryplugin.so
13-
usr/lib/qgis/plugins/libdisplacementplugin.so
1413
usr/lib/qgis/plugins/libofflineeditingplugin.so
1514
usr/lib/qgis/plugins/libroadgraphplugin.so
1615
usr/lib/qgis/plugins/libzonalstatisticsplugin.so

src/app/CMakeLists.txt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -321,16 +321,12 @@ ENDIF (POSTGRES_FOUND)
321321

322322
IF (HAVE_SPATIALITE)
323323
SET (QGIS_APP_SRCS ${QGIS_APP_SRCS}
324-
spatialite/qgsspatialitesourceselect.cpp
325324
spatialite/qgsnewspatialitelayerdialog.cpp
326325
spatialite/qgsspatialitesridsdialog.cpp
327-
spatialite/qgsspatialitetablemodel.cpp
328326
)
329327
SET (QGIS_APP_MOC_HDRS ${QGIS_APP_MOC_HDRS}
330-
spatialite/qgsspatialitesourceselect.h
331328
spatialite/qgsnewspatialitelayerdialog.h
332329
spatialite/qgsspatialitesridsdialog.h
333-
spatialite/qgsspatialitetablemodel.h
334330
)
335331
ENDIF (HAVE_SPATIALITE)
336332

src/app/legend/qgslegend.cpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1752,7 +1752,12 @@ void QgsLegend::refreshLayerSymbology( QString key, bool expandItem )
17521752
}
17531753

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

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

17651770
//restore the current item again
1766-
setCurrentIndex( currentItemIndex );
1771+
setCurrentItem( current );
17671772
adjustIconSize();
17681773
setItemExpanded( theLegendLayer, expandItem );//make sure the symbology items are visible
17691774
}

src/app/qgisapp.cpp

Lines changed: 8 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,6 @@ extern "C"
241241
{
242242
#include <spatialite.h>
243243
}
244-
#include "spatialite/qgsspatialitesourceselect.h"
245244
#include "spatialite/qgsnewspatialitelayerdialog.h"
246245
#endif
247246

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

23482347
// show the SpatiaLite dialog
2349-
2350-
QgsSpatiaLiteSourceSelect *dbs = new QgsSpatiaLiteSourceSelect( this );
2351-
2352-
mMapCanvas->freeze();
2353-
2354-
if ( dbs->exec() )
2348+
QDialog *dbs = dynamic_cast<QDialog*>( QgsProviderRegistry::instance()->selectWidget( QString( "spatialite" ), this ) );
2349+
if ( !dbs )
23552350
{
2356-
// Let render() do its own cursor management
2357-
// QApplication::setOverrideCursor(Qt::WaitCursor);
2358-
2359-
2360-
// repaint the canvas if it was covered by the dialog
2361-
2362-
// add files to the map canvas
2363-
QStringList tables = dbs->selectedTables();
2364-
2365-
QApplication::setOverrideCursor( Qt::WaitCursor );
2366-
2367-
// for each selected table, connect to the database and build a canvasitem for it
2368-
QStringList::Iterator it = tables.begin();
2369-
while ( it != tables.end() )
2370-
{
2371-
// create the layer
2372-
QgsDataSourceURI uri( *it );
2373-
QgsVectorLayer *layer = new QgsVectorLayer( uri.uri(), uri.table(), "spatialite" );
2374-
if ( layer->isValid() )
2375-
{
2376-
// register this layer with the central layers registry
2377-
QgsMapLayerRegistry::instance()->addMapLayer( layer );
2378-
}
2379-
else
2380-
{
2381-
QgsDebugMsg(( *it ) + " is an invalid layer - not loaded" );
2382-
QMessageBox::critical( this, tr( "Invalid Layer" ), tr( "%1 is an invalid layer and cannot be loaded." ).arg( *it ) );
2383-
delete layer;
2384-
}
2385-
//qWarning("incrementing iterator");
2386-
++it;
2387-
}
2388-
2389-
QApplication::restoreOverrideCursor();
2390-
2391-
statusBar()->showMessage( mMapCanvas->extent().toString( 2 ) );
2351+
QMessageBox::warning( this, tr( "SpatiaLite" ), tr( "Cannot get SpatiaLite select dialog from provider." ) );
2352+
return;
23922353
}
2354+
connect( dbs , SIGNAL( addDatabaseLayers( QStringList const &, QString const & ) ),
2355+
this , SLOT( addDatabaseLayers( QStringList const &, QString const & ) ) );
2356+
dbs->exec();
23932357
delete dbs;
23942358

2395-
// update UI
2396-
qApp->processEvents();
2397-
2398-
// draw the map
2399-
mMapCanvas->freeze( false );
2400-
mMapCanvas->refresh();
2401-
2402-
// Let render() do its own cursor management
2403-
// QApplication::restoreOverrideCursor();
2404-
24052359
} // QgisApp::addSpatiaLiteLayer()
24062360
#endif
24072361

src/app/qgsoptions.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,11 +177,11 @@ QgsOptions::QgsOptions( QWidget *parent, Qt::WFlags fl ) :
177177
// set the display update threshold
178178
spinBoxUpdateThreshold->setValue( settings.value( "/Map/updateThreshold" ).toInt() );
179179
//set the default projection behaviour radio buttongs
180-
if ( settings.value( "/Projections/defaultBehaviour" ).toString() == "prompt" )
180+
if ( settings.value( "/Projections/defaultBehaviour", "prompt" ).toString() == "prompt" )
181181
{
182182
radPromptForProjection->setChecked( true );
183183
}
184-
else if ( settings.value( "/Projections/defaultBehaviour" ).toString() == "useProject" )
184+
else if ( settings.value( "/Projections/defaultBehaviour", "prompt" ).toString() == "useProject" )
185185
{
186186
radUseProjectProjection->setChecked( true );
187187
}

0 commit comments

Comments
 (0)