Skip to content

Commit

Permalink
Merge pull request #1341 from mrvisscher/visible-db-for-cf
Browse files Browse the repository at this point in the history
Make the dependent biosphere database visible in the CF table
  • Loading branch information
mrvisscher authored Sep 16, 2024
2 parents a453160 + 89f28fa commit 09c5a30
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions activity_browser/ui/tables/impact_categories.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,17 +255,17 @@ def __init__(self, parent=None):
super().__init__(parent)
self.model = MethodCharacterizationFactorsModel(parent=self)
self.setVisible(False)
self.setItemDelegateForColumn(2, FloatDelegate(self))
self.setItemDelegateForColumn(4, UncertaintyDelegate(self))
self.setItemDelegateForColumn(6, FloatDelegate(self))
self.setItemDelegateForColumn(3, FloatDelegate(self))
self.setItemDelegateForColumn(5, UncertaintyDelegate(self))
self.setItemDelegateForColumn(7, FloatDelegate(self))
self.setItemDelegateForColumn(8, FloatDelegate(self))
self.setItemDelegateForColumn(9, FloatDelegate(self))
self.setItemDelegateForColumn(10, FloatDelegate(self))
self.setItemDelegateForColumn(11, FloatDelegate(self))

self.model.updated.connect(self.update_proxy_model)
self.model.updated.connect(self.set_filter_data)
self.model.updated.connect(lambda: self.setColumnHidden(5, True))
self.model.updated.connect(lambda: self.setColumnHidden(6, True))

self.read_only = True
self.setAcceptDrops(not self.read_only)
Expand Down
4 changes: 2 additions & 2 deletions activity_browser/ui/tables/models/impact_categories.py
Original file line number Diff line number Diff line change
Expand Up @@ -295,8 +295,8 @@ def search_tree(tree: dict, query: str, matches: int = 0) -> (dict, int):


class MethodCharacterizationFactorsModel(EditablePandasModel):
COLUMNS = ["name", "categories", "amount", "unit"]
HEADERS = ["Name", "Category", "Amount", "Unit", "Uncertainty"] + ["cf"]
COLUMNS = ["name", "categories", "database", "amount", "unit"]
HEADERS = ["Name", "Category", "Database", "Amount", "Unit", "Uncertainty"] + ["cf"]
UNCERTAINTY = ["loc", "scale", "shape", "minimum", "maximum"]

def __init__(self, parent=None):
Expand Down

0 comments on commit 09c5a30

Please sign in to comment.