def paste_action_callback(self, *event): """Callback method for paste action""" if react_to_event( self.view, self.oc_list_ctrl.tree_view, event) and self.oc_list_ctrl.active_entry_widget is None: global_clipboard.paste(self.model, limited=['outcomes']) return True
def paste_action_callback(self, *event): """Callback method for paste action The method trigger the clipboard paste of the list of scoped variables in the clipboard or in case this list is empty and there are other port types selected in the clipboard it will trigger the paste with convert flag. The convert flag will cause the insertion of scoped variables with the same names, data types and default values the objects of differing port type (in the clipboard) have. """ if react_to_event(self.view, self.tree_view, event) and self.active_entry_widget is None: if not global_clipboard.model_copies["scoped_variables"] and \ (global_clipboard.model_copies["input_data_ports"] or global_clipboard.model_copies["output_data_ports"]): global_clipboard.paste(self.model, limited=['scoped_variables'], convert=True) else: global_clipboard.paste(self.model, limited=['scoped_variables']) return True
def paste_action_callback(self, *event, **kwargs): """Callback method for paste action The method triggers the paste method of the clipboard paste. If there are OutputDataPorts in the clipboard, those are pasted. If there are no OutputDataPorts, it is tried to paste converted InputDataPorts and ScopedVariables. """ if react_to_event(self.view, self.tree_view, event) and self.active_entry_widget is None: if not global_clipboard.model_copies["output_data_ports"] and \ (global_clipboard.model_copies["input_data_ports"] or global_clipboard.model_copies["scoped_variables"]): global_clipboard.paste(self.model, limited=['output_data_ports'], convert=True) else: global_clipboard.paste(self.model, limited=['output_data_ports']) return True