Skip to content

Commit

Permalink
Merge pull request biolab#1808 from ales-erjavec/fixes/table-clipboar…
Browse files Browse the repository at this point in the history
…d-copy

[FIX] Fix copy to clipboard in "Data Table" widget
(cherry picked from commit c4755ab)
  • Loading branch information
kernc authored and astaric committed Jan 13, 2017
1 parent 9019b6c commit db22e4e
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions Orange/widgets/data/owtable.py
Original file line number Diff line number Diff line change
Expand Up @@ -320,8 +320,8 @@ def table_selection_to_mime_data(table):
"""
lines = table_selection_to_list(table)

csv = lines_to_csv_string(lines, dialect="excel")
tsv = lines_to_csv_string(lines, dialect="excel-tab")
csv = lines_to_csv_string(lines, dialect="excel").encode("utf-8")
tsv = lines_to_csv_string(lines, dialect="excel-tab").encode("utf-8")

mime = QMimeData()
mime.setData("text/csv", QByteArray(csv))
Expand Down Expand Up @@ -432,9 +432,8 @@ def __init__(self):
self.tabs = gui.tabWidget(self.mainArea)
self.tabs.currentChanged.connect(self._on_current_tab_changed)

copy = QAction("Copy", self, shortcut=QKeySequence.Copy,
triggered=self.copy)
self.addAction(copy)
def copy_to_clipboard(self):
self.copy()

def sizeHint(self):
return QSize(800, 500)
Expand Down

0 comments on commit db22e4e

Please sign in to comment.