(self)
Commit the selected data to output.
Commit the selected data to output.
Commit the selected data to output .
def commit(self):
        """Commit the selected data to output."""
        if self.data is None:
            self.Outputs.selected_data.send(None)
            self.Outputs.annotated_data.send(None)
            return

        nodes = [
            i.tree_node.label for i in self.scene.selectedItems()
            if isinstance(i, SquareGraphicsItem)
        ]
        data = self.tree_adapter.get_instances_in_nodes(nodes)

        self.Outputs.selected_data.send(data)
        selected_indices = self.tree_adapter.get_indices(nodes)
        self.Outputs.annotated_data.send(
            create_annotated_table(self.data, selected_indices)
        )
def commit ( self ) : if self . data is None : self . Outputs . selected_data . send ( None ) self . Outputs . annotated_data . send ( None ) return nodes = [ i . tree_node . label for i in self . scene . selectedItems ( ) if isinstance ( i , SquareGraphicsItem ) ] data = self . tree_adapter . get_instances_in_nodes ( nodes ) self . Outputs . selected_data . send ( data ) selected_indices = self . tree_adapter . get_indices ( nodes ) self . Outputs . annotated_data . send ( create_annotated_table ( self . data , selected_indices ) )