Skip to content
Snippets Groups Projects
Commit 54bcef87 authored by Benjamin Jakimow's avatar Benjamin Jakimow
Browse files

pulled qps updates


Signed-off-by: Benjamin Jakimow's avatarBenjamin Jakimow <benjamin.jakimow@geo.hu-berlin.de>
parent 0a0c93a1
No related branches found
No related tags found
No related merge requests found
......@@ -88,6 +88,9 @@ class MapTools(enum.Enum):
MoveToCenter = 'MOVE_CENTER'
AddFeature = 'ADD_FEATURE'
SelectFeature = 'SELECT_FEATURE'
SelectFeatureByPolygon = 'SELECT_FEATURE_POLYGON'
SelectFeatureByFreehand = 'SELECT_FEATURE_FREEHAND'
SelectFeatureByRadius = 'SELECT_FEATURE_RADIUS'
@staticmethod
def toMapToolEnum(arg):
......@@ -142,6 +145,16 @@ class MapTools(enum.Enum):
mapTool = QgsMapToolAddFeature(canvas, *args, **kwds)
elif mapToolEnum == MapTools.SelectFeature:
mapTool = QgsMapToolSelect(canvas)
mapTool.setSelectionMode(QgsMapToolSelectionHandler.SelectionMode.SelectSimple)
elif mapToolEnum == MapTools.SelectFeatureByFreehand:
mapTool = QgsMapToolSelect(canvas)
mapTool.setSelectionMode(QgsMapToolSelectionHandler.SelectionMode.SelectFreehand)
elif mapToolEnum == MapTools.SelectFeatureByPolygon:
mapTool = QgsMapToolSelect(canvas)
mapTool.setSelectionMode(QgsMapToolSelectionHandler.SelectionMode.SelectPolygon)
elif mapToolEnum == MapTools.SelectFeatureByRadius:
mapTool = QgsMapToolSelect(canvas)
mapTool.setSelectionMode(QgsMapToolSelectionHandler.SelectionMode.SelectRadius)
else:
raise NotImplementedError('Unknown MapTool "{}"'.format(mapToolEnum))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment