Skip to content
Permalink
Browse files

Use a pan tool for map views

  • Loading branch information
nyalldawson committed Mar 13, 2017
1 parent 7b28760 commit dbe54c0d95067408397b080f59c97132ec8d9ee7
Showing with 6 additions and 0 deletions.
  1. +3 −0 src/app/qgsmapcanvasdockwidget.cpp
  2. +3 −0 src/app/qgsmapcanvasdockwidget.h
@@ -19,6 +19,7 @@
#include "qgsstatusbarmagnifierwidget.h"
#include "qgsdoublespinbox.h"
#include "qgssettings.h"
#include "qgsmaptoolpan.h"
#include <QMessageBox>
#include <QMenu>
#include <QToolBar>
@@ -36,6 +37,8 @@ QgsMapCanvasDockWidget::QgsMapCanvasDockWidget( const QString &name, QWidget *pa

setWindowTitle( name );
mMapCanvas = new QgsMapCanvas( this );
mPanTool = new QgsMapToolPan( mMapCanvas );
mMapCanvas->setMapTool( mPanTool );

mMainWidget->setLayout( new QVBoxLayout() );
mMainWidget->layout()->setContentsMargins( 0, 0, 0, 0 );
@@ -20,11 +20,13 @@
#include "qgsdockwidget.h"
#include "qgis_app.h"
#include <QWidgetAction>
#include <memory>

class QgsMapCanvas;
class QgsScaleComboBox;
class QgsDoubleSpinBox;
class QgsStatusBarMagnifierWidget;
class QgsMapToolPan;

/**
* \class QgsMapCanvasDockWidget
@@ -74,6 +76,7 @@ class APP_EXPORT QgsMapCanvasDockWidget : public QgsDockWidget, private Ui::QgsM
bool mBlockScaleUpdate = false;
bool mBlockRotationUpdate = false;
bool mBlockMagnificationUpdate = false;
QgsMapToolPan *mPanTool = nullptr;
};

/**

0 comments on commit dbe54c0

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