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)