Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions loopstructural/gui/modelling/modelling_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
StratigraphyStep,
ViewStep,
)
from loopstructural.gui.modelling.steps.section_stack import SectionStack
from loopstructural.gui.modelling.steps.section_stack import SectionStack, page_scroll_area
from loopstructural.gui.modelling.steps.step_bar import StepBar

# How often the checks of the steps run again, in milliseconds. Several
Expand Down Expand Up @@ -86,8 +86,10 @@ def __init__(
self.header = DockHeader(self, data_manager=self.data_manager)
self.step_bar = StepBar(STEPS, self)
self.stack = QStackedWidget(self)
# A stacked widget is as tall as its tallest page. A scroll area around
# each page lets the dock be short: the page scrolls and the footer stays.
for page in self.pages:
self.stack.addWidget(page)
self.stack.addWidget(page_scroll_area(page, self.stack))

self.footer_label = QLabel(self)
# One line. The tooltip has all messages. The label can be shorter than
Expand Down
10 changes: 5 additions & 5 deletions loopstructural/gui/modelling/steps/pages.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

from . import checks
from .export_panel import ExportPanel
from .section_stack import SectionStack, page_scroll_area
from .section_stack import SectionStack


class StepPage(QWidget):
Expand Down Expand Up @@ -99,7 +99,7 @@ def __init__(self, parent=None, **kwargs):
mode_row.addWidget(self.mode_combo, 1)
layout.addLayout(mode_row)
self.tab = ModelDefinitionTab(self, data_manager=self.data_manager)
layout.addWidget(page_scroll_area(self.tab, self), 1)
layout.addWidget(self.tab, 1)

def set_workflow_mode(self, mode):
index = self.mode_combo.findData(mode)
Expand Down Expand Up @@ -138,7 +138,7 @@ def __init__(self, parent=None, **kwargs):
).setToolTip("Show the order of the column on the geology polygons.")

# The source layers are a section of the column stack, so the page has
# at most two open sections and one scroll area.
# at most two open sections. The dock puts each page in a scroll area.
self.stratigraphy_layers = StratigraphicLayersWidget(self, self.data_manager)
sections = self.tab.stratigraphic_column_widget.sections
sections.add_section(
Expand All @@ -164,7 +164,7 @@ def __init__(self, parent=None, **kwargs):
row.addStretch(1)
row.addWidget(derive)
layout.addLayout(row)
layout.addWidget(page_scroll_area(self.tab, self), 1)
layout.addWidget(self.tab, 1)

# With contacts from the geology polygons, the "Stratigraphic layers"
# section has the geology picker, so do not show a second one
Expand Down Expand Up @@ -235,7 +235,7 @@ def __init__(self, parent=None, **kwargs):
layout.addLayout(row)

self.adjacency = FaultAdjacencyTab(self, data_manager=self.data_manager)
layout.addWidget(page_scroll_area(self.adjacency, self), 1)
layout.addWidget(self.adjacency, 1)

def _fault_layer_summary(self):
if self.data_manager is None:
Expand Down
Loading