Skip to content
Permalink
Browse files
only consider the crs of layers with geometry for automatically setti…
…ng of project crs and otfr (fixes #10510)
  • Loading branch information
jef-n committed Jun 29, 2014
1 parent 9bbefef commit 0a2948af30d4004d8dd732b405da1cfcdaa160b6
@@ -459,8 +459,8 @@ void QgisApp::validateSrs( QgsCoordinateReferenceSystem &srs )
QString myDefaultProjectionOption = mySettings.value( "/Projections/defaultBehaviour", "prompt" ).toString();
if ( myDefaultProjectionOption == "prompt" )
{
//@note this class is not a descendent of QWidget so we cant pass
//it in the ctor of the layer projection selector
// @note this class is not a descendent of QWidget so we can't pass
// it in the ctor of the layer projection selector

QgsGenericProjectionSelector *mySelector = new QgsGenericProjectionSelector();
mySelector->setMessage( srs.validationHint() ); //shows a generic message, if not specified
@@ -214,7 +214,7 @@ class CORE_EXPORT QgsComposition : public QGraphicsScene

/**Sets the snap tolerance to use when automatically snapping items during movement and resizing to guides
* and the edges and centers of other items.
* @param t snap tolerance in pixels
* @param snapTolerance snap tolerance in pixels
* @see alignmentSnapTolerance
* @note Added in QGIS 2.5
*/
@@ -18,7 +18,7 @@
#include "qgslayertree.h"
#include "qgslayertreeutils.h"
#include "qgsmaplayer.h"

#include "qgsvectorlayer.h"
#include "qgsmapcanvas.h"

QgsLayerTreeMapCanvasBridge::QgsLayerTreeMapCanvasBridge( QgsLayerTreeGroup *root, QgsMapCanvas *canvas, QObject* parent )
@@ -123,7 +123,12 @@ void QgsLayerTreeMapCanvasBridge::setCanvasLayers()
{
foreach ( QgsLayerTreeLayer* layerNode, layerNodes )
{
if ( layerNode->layer() )
if ( layerNode->layer() &&
(
qobject_cast<QgsVectorLayer *>( layerNode->layer() ) == 0 ||
qobject_cast<QgsVectorLayer *>( layerNode->layer() )->geometryType() != QGis::NoGeometry
)
)
{
mCanvas->setDestinationCrs( layerNode->layer()->crs() );
mCanvas->setMapUnits( layerNode->layer()->crs().mapUnits() );
@@ -4633,5 +4633,101 @@
</hint>
</hints>
</connection>
<connection>
<sender>radUseGlobalProjection</sender>
<signal>toggled(bool)</signal>
<receiver>leLayerGlobalCrs</receiver>
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>310</x>
<y>285</y>
</hint>
<hint type="destinationlabel">
<x>644</x>
<y>312</y>
</hint>
</hints>
</connection>
<connection>
<sender>radUseGlobalProjection</sender>
<signal>toggled(bool)</signal>
<receiver>pbnSelectProjection</receiver>
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>345</x>
<y>287</y>
</hint>
<hint type="destinationlabel">
<x>717</x>
<y>303</y>
</hint>
</hints>
</connection>
<connection>
<sender>radUseProjectProjection</sender>
<signal>toggled(bool)</signal>
<receiver>leLayerGlobalCrs</receiver>
<slot>setDisabled(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>310</x>
<y>285</y>
</hint>
<hint type="destinationlabel">
<x>644</x>
<y>312</y>
</hint>
</hints>
</connection>
<connection>
<sender>radUseProjectProjection</sender>
<signal>toggled(bool)</signal>
<receiver>pbnSelectProjection</receiver>
<slot>setDisabled(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>345</x>
<y>287</y>
</hint>
<hint type="destinationlabel">
<x>717</x>
<y>303</y>
</hint>
</hints>
</connection>
<connection>
<sender>radPromptForProjection</sender>
<signal>toggled(bool)</signal>
<receiver>leLayerGlobalCrs</receiver>
<slot>setDisabled(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>310</x>
<y>285</y>
</hint>
<hint type="destinationlabel">
<x>644</x>
<y>312</y>
</hint>
</hints>
</connection>
<connection>
<sender>radPromptForProjection</sender>
<signal>toggled(bool)</signal>
<receiver>pbnSelectProjection</receiver>
<slot>setDisabled(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>345</x>
<y>287</y>
</hint>
<hint type="destinationlabel">
<x>717</x>
<y>303</y>
</hint>
</hints>
</connection>
</connections>
</ui>

0 comments on commit 0a2948a

Please sign in to comment.