def solverRemoveClicked(self): ui_nodes = lib_uiquery.get_selected_ui_table_row( self.solver_tableView, self.solver_model, self.solver_filterModel) names = map(lambda x: x.name(), ui_nodes) col_nodes = lib_uiquery.convert_ui_nodes_to_nodes( ui_nodes, 'collection_node') assert len(names) == len(col_nodes) for name, col in zip(names, col_nodes): step = lib_col.get_named_solver_step_from_collection(col, name) lib_col.remove_solver_step_from_collection(col, step) self.updateSolverModel() self.updateSolveValidState() return
def removeClicked(self): ui_nodes = lib_uiquery.get_selected_ui_table_row( self.tableView, self.model, self.filterModel) names = map(lambda x: x.name(), ui_nodes) col_nodes = lib_uiquery.convert_ui_nodes_to_nodes( ui_nodes, 'collection_node') assert len(names) == len(col_nodes) for name, col in zip(names, col_nodes): step = lib_col.get_named_solver_step_from_collection(col, name) lib_col.remove_solver_step_from_collection(col, step) self.itemRemoved.emit() self.dataChanged.emit() self.viewUpdated.emit() return
def stepNode(self): col = self.collectionNode() name = self.name() n = lib_collection.get_named_solver_step_from_collection(col, name) return n