Skip to content

Commit

Permalink
Update MouseClick.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Mariosmsk committed Mar 7, 2019
1 parent 56fe20b commit 7e4d778
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions MouseClick.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,7 @@ def canvasDoubleClickEvent(self, event):
fields = [field.name().upper() for field in layer.fields()]
if 'PATH' or 'PHOTO' in fields:
lRect = self.canvas.mapSettings().mapToLayerCoordinates(layer, rect)
try:
layer.selectByRect(lRect, False)
except:
layer.select(lRect, False)
layer.selectByRect(lRect, False)
selected_features = layer.selectedFeatures()
if selected_features != []:
layersSelected.append(layer)
Expand Down

0 comments on commit 7e4d778

Please sign in to comment.