Skip to content
Permalink
Browse files

fix #2255

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@12405 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef
jef committed Dec 11, 2009
1 parent 6057535 commit 7fd44b670c34a45fa46ce6a6967b5d8a53234981
Showing with 14 additions and 4 deletions.
  1. +2 −0 src/app/qgsidentifyresults.cpp
  2. +3 −1 src/core/qgsmaplayer.cpp
  3. +9 −3 src/core/qgsmaplayer.h
@@ -159,13 +159,15 @@ void QgsIdentifyResults::addFeature( QgsMapLayer *layer, int fid,
if ( vlayer )
{
connect( vlayer, SIGNAL( layerDeleted() ), this, SLOT( layerDestroyed() ) );
connect( vlayer, SIGNAL( layerCrsChanged() ), this, SLOT( layerDestroyed() ) );
connect( vlayer, SIGNAL( featureDeleted( int ) ), this, SLOT( featureDeleted( int ) ) );
connect( vlayer, SIGNAL( editingStarted() ), this, SLOT( editingToggled() ) );
connect( vlayer, SIGNAL( editingStopped() ), this, SLOT( editingToggled() ) );
}
else
{
connect( layer, SIGNAL( destroyed() ), this, SLOT( layerDestroyed() ) );
connect( layer, SIGNAL( layerCrsChanged() ), this, SLOT( layerDestroyed() ) );
}
}

@@ -440,9 +440,11 @@ const QgsCoordinateReferenceSystem& QgsMapLayer::srs()
return *mCRS;
}

void QgsMapLayer::setCrs( const QgsCoordinateReferenceSystem& srs )
void QgsMapLayer::setCrs( const QgsCoordinateReferenceSystem& srs, bool emitSignal )
{
*mCRS = srs;
if ( emitSignal )
emit layerCrsChanged();
}

unsigned int QgsMapLayer::getTransparency()
@@ -211,8 +211,9 @@ class CORE_EXPORT QgsMapLayer : public QObject
*/
const QgsCoordinateReferenceSystem& srs();

/** Sets layer's spatial reference system */
void setCrs( const QgsCoordinateReferenceSystem& srs );
/** Sets layer's spatial reference system
@note emitSignal added in 1.4 */
void setCrs( const QgsCoordinateReferenceSystem& srs, bool emitSignal = true );


/** A convenience function to capitalise the layer name */
@@ -320,9 +321,14 @@ class CORE_EXPORT QgsMapLayer : public QObject
/** Emit a signal with status (e.g. to be caught by QgisApp and display a msg on status bar) */
void statusChanged( QString theStatus );

/** Emit a signal that layer name has been changed */
/** Emit a signal that the layer name has been changed */
void layerNameChanged();

/** Emit a signal that layer's CRS has been reset
added in 1.4
*/
void layerCrsChanged();

/** This signal should be connected with the slot QgsMapCanvas::refresh()
* @TODO: to be removed - GUI dependency
*/

0 comments on commit 7fd44b6

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