Skip to content

Commit

Permalink
Merge pull request #340 from teddyrendahl/no-channel
Browse files Browse the repository at this point in the history
FIX: Do not assume widget has populated channels
  • Loading branch information
hhslepicka authored Jun 6, 2018
2 parents a0d3252 + 010fe79 commit edf4483
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pydm/application.py
Original file line number Diff line number Diff line change
Expand Up @@ -531,6 +531,9 @@ def eventFilter(self, obj, event):
# Not sure if showing the tooltip should be the job of the app,
# may want to revisit this.
def show_address_tooltip(self, obj, event):
if not len(obj.channels()):
logger.warning("Object %r has no PyDM Channels", obj)
return
addr = obj.channels()[0].address
QToolTip.showText(event.globalPos(), addr)
# If the address has a protocol, and it is the default protocol, strip it out before putting it on the clipboard.
Expand Down

0 comments on commit edf4483

Please sign in to comment.