From 09714416be8273710b02cc5bf6cf8505d1d590a0 Mon Sep 17 00:00:00 2001 From: kernc Date: Fri, 9 Dec 2016 13:47:04 +0100 Subject: [PATCH] Merge pull request #1808 from ales-erjavec/fixes/table-clipboard-copy [FIX] Fix copy to clipboard in "Data Table" widget (cherry picked from commit c4755ab3b642675702076ff8ef5881468b8a73dc) --- Orange/widgets/data/owtable.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Orange/widgets/data/owtable.py b/Orange/widgets/data/owtable.py index f5dbdc0f5cc..d02fe79b764 100644 --- a/Orange/widgets/data/owtable.py +++ b/Orange/widgets/data/owtable.py @@ -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)) @@ -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)