Skip to content

Commit

Permalink
- fix to enable custom map canvas item positioning
Browse files Browse the repository at this point in the history
- QAction of map tool now gets unchecked when tool has been deactivated
  even if it's in another action group


git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@5154 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
wonder committed Apr 4, 2006
1 parent a6ad405 commit 868c0d5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
8 changes: 2 additions & 6 deletions src/gui/qgsmapcanvasitem.h
Expand Up @@ -57,15 +57,11 @@ class QgsMapCanvasItem : public QObject, public Q3CanvasRectangle

//! transformation from map coordinates to screen coordinates
QPoint toCanvasCoords(const QgsPoint& point);



public slots:


/** called on changed extents or changed item rectangle
* Override this in your subclass if you wish to have custom
* behaviour for when the canvas area of interest is changed */
void updatePosition();
virtual void updatePosition();

protected:

Expand Down
6 changes: 4 additions & 2 deletions src/gui/qgsmaptool.cpp
Expand Up @@ -48,13 +48,15 @@ void QgsMapTool::activate()
{
// make action active
if (mAction)
mAction->setOn(true);
mAction->setChecked(true);

// set cursor (map tools usually set it in constructor
// set cursor (map tools usually set it in constructor)
mCanvas->setCursor(mCursor);
}


void QgsMapTool::deactivate()
{
if (mAction)
mAction->setChecked(false);
}

0 comments on commit 868c0d5

Please sign in to comment.