649 |
dlg.Destroy() |
dlg.Destroy() |
650 |
|
|
651 |
def identify_view_on_demand(self, layer, shapes): |
def identify_view_on_demand(self, layer, shapes): |
652 |
|
"""Subscribed to the canvas' SHAPES_SELECTED message |
653 |
|
|
654 |
|
If the current tool is the identify tool, at least one shape is |
655 |
|
selected and the identify dialog is not shown, show the dialog. |
656 |
|
""" |
657 |
|
# If the selection has become empty we don't need to do |
658 |
|
# anything. Otherwise it could happen that the dialog was popped |
659 |
|
# up when the selection became empty, e.g. when a new selection |
660 |
|
# is opened while the identify tool is active and dialog had |
661 |
|
# been closed |
662 |
|
if not shapes: |
663 |
|
return |
664 |
|
|
665 |
name = "identify_view" |
name = "identify_view" |
666 |
if self.canvas.CurrentTool() == "IdentifyTool": |
if self.canvas.CurrentTool() == "IdentifyTool": |
667 |
if not self.dialog_open(name): |
if not self.dialog_open(name): |