Skip to content

Commit

Permalink
hid domain contrasts when not standard layers and moved tab
Browse files Browse the repository at this point in the history
  • Loading branch information
alexhroom committed Nov 20, 2024
1 parent ece5a7a commit abca1da
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions rascal2/widgets/project/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ def __init__(self, parent):
"Layers": ["layers"],
"Data": [],
"Backgrounds": [],
"Contrasts": [],
"Domains": ["domain_ratios", "domain_contrasts"],
"Contrasts": [],
}

self.view_tabs = {}
Expand Down Expand Up @@ -262,11 +262,13 @@ def handle_tabs(self) -> None:
self.project_tab.setTabVisible(domain_tab_index, is_domains)
self.edit_project_tab.setTabVisible(domain_tab_index, is_domains)

# the layers tab should only be visible in standard layers
# the layers tab and domain contrasts table should only be visible in standard layers
layers_tab_index = list(self.view_tabs).index("Layers")
is_layers = self.model_combobox.currentText() == LayerModels.StandardLayers
self.project_tab.setTabVisible(layers_tab_index, is_layers)
self.edit_project_tab.setTabVisible(layers_tab_index, is_layers)
self.view_tabs["Domains"].tables["domain_contrasts"].setVisible(is_layers)
self.edit_tabs["Domains"].tables["domain_contrasts"].setVisible(is_layers)

def handle_controls_update(self):
"""Handle updates to Controls that need to be reflected in the project."""
Expand Down

0 comments on commit abca1da

Please sign in to comment.