Skip to content

Commit

Permalink
Merge 012e764 into 1a9d2f3
Browse files Browse the repository at this point in the history
  • Loading branch information
hhslepicka authored Aug 14, 2018
2 parents 1a9d2f3 + 012e764 commit 979e575
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions pydm/application.py
Original file line number Diff line number Diff line change
Expand Up @@ -562,9 +562,14 @@ def show_address_tooltip(self, obj, event):
# If the address has a protocol, and it is the default protocol, strip it out before putting it on the clipboard.
m = re.match('(.+?):/{2,3}(.+?)$', addr)
if m is not None and DEFAULT_PROTOCOL is not None and m.group(1) == DEFAULT_PROTOCOL:
QApplication.clipboard().setText(m.group(2), mode=QClipboard.Selection)
copy_text = m.group(2)
else:
QApplication.clipboard().setText(addr, mode=QClipboard.Selection)
copy_text = addr

clipboard = QApplication.clipboard()
clipboard.setText(copy_text)
event = QEvent(QEvent.Clipboard)
self.sendEvent(clipboard, event)

def establish_widget_connections(self, widget):
"""
Expand Down

0 comments on commit 979e575

Please sign in to comment.