gui: cut from editable to clipboard when cell is focused
authorFriedrich Beckmann <friedrich.beckmann@gmx.de>
Wed, 8 Jul 2020 11:49:42 +0000 (13:49 +0200)
committerFriedrich Beckmann <friedrich.beckmann@gmx.de>
Wed, 8 Jul 2020 12:10:04 +0000 (14:10 +0200)
When a cell is focused, then the cut operation
must operate on the selection in the cell editable
and not on the complete cell, i.e. the store content.

src/ui/gui/psppire-data-window.c

index 438779675b7fe365bd4242021bf89b5e37392146..5b5343c693c75a9bb9ed743fbddad1e062d347bb 100644 (file)
@@ -1073,6 +1073,11 @@ on_cut (PsppireDataWindow *dw)
       SswSheet *sheet = SSW_SHEET (dw->data_editor->data_sheet);
       SswRange sel = *sheet->selection;
 
+#if (SSW_SHEET_API_VERSION >= 1)
+      if ((ssw_sheet_get_api_version() >= 1) && ssw_sheet_try_cut (sheet))
+       return;
+#endif
+
       GtkClipboard *clip =
        gtk_clipboard_get_for_display (gtk_widget_get_display (GTK_WIDGET (dw)),
                                       GDK_SELECTION_CLIPBOARD);