Search in sources :

Example 1 with RemoveWidgetsAction

use of org.csstudio.display.builder.editor.undo.RemoveWidgetsAction in project org.csstudio.display.builder by kasemir.

the class DisplayEditor method cutToClipboard.

/**
 * Cut (delete) selected widgets, placing them on the clipboard
 */
public void cutToClipboard() {
    if (selection_tracker.isInlineEditorActive())
        return;
    // Strictly speaking, delete would not copy to the clipboard...
    final List<Widget> widgets = copyToClipboard();
    if (widgets == null)
        return;
    undo.execute(new RemoveWidgetsAction(selection, widgets));
}
Also used : RemoveWidgetsAction(org.csstudio.display.builder.editor.undo.RemoveWidgetsAction) ArrayWidget(org.csstudio.display.builder.model.widgets.ArrayWidget) Widget(org.csstudio.display.builder.model.Widget)

Aggregations

RemoveWidgetsAction (org.csstudio.display.builder.editor.undo.RemoveWidgetsAction)1 Widget (org.csstudio.display.builder.model.Widget)1 ArrayWidget (org.csstudio.display.builder.model.widgets.ArrayWidget)1