Skip to content

Commit

Permalink
fix review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
eivindjahren committed Jun 24, 2024
1 parent c647e41 commit a70084c
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 10 deletions.
1 change: 0 additions & 1 deletion src/ert/gui/simulation/experiment_panel.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,6 @@ def addExperimentConfigPanel(

if not mode_enabled:
item_count = self._experiment_type_combo.count() - 1
combo_model = self._experiment_type_combo.model()
sim_item = self._experiment_type_combo.model().item(item_count) # type: ignore
sim_item.setEnabled(False)
sim_item.setToolTip("Both observations and parameters must be defined")
Expand Down
6 changes: 2 additions & 4 deletions src/ert/gui/tools/file/file_dialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,20 +146,18 @@ def _update_cursor(self, value: int) -> None:
def _enable_follow_mode(self, enable: bool) -> None:
vertical_scroll_bar = self._view.verticalScrollBar()
assert vertical_scroll_bar is not None
vertical_scroll_bar.setDisabled(enable)
self._follow_mode = enable
if enable:
self._view.moveCursor(QTextCursor.End)
self._view.setVerticalScrollBarPolicy(Qt.ScrollBarPolicy.ScrollBarAlwaysOff)
vertical_scroll_bar.setDisabled(True)
self._view.setTextInteractionFlags(Qt.TextInteractionFlag.NoTextInteraction)
self._follow_mode = True
else:
vertical_scroll_bar.setDisabled(False)
self._view.setVerticalScrollBarPolicy(Qt.ScrollBarPolicy.ScrollBarAsNeeded)
self._view.setTextInteractionFlags(
Qt.TextInteractionFlags(Qt.TextInteractionFlag.TextSelectableByMouse)
| Qt.TextInteractionFlag.TextSelectableByKeyboard
)
self._follow_mode = False

def _append_text(self, text: str) -> None:
# Remove trailing newline as appendPlainText adds this
Expand Down
4 changes: 1 addition & 3 deletions src/ert/gui/tools/plot/customize/customize_plot_dialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,9 +213,7 @@ def __init__(

self._tabs = QTabWidget()
layout.addWidget(self._tabs)
layout.setSizeConstraint(
QLayout.SizeConstraint.SetFixedSize
) # not resizable!!!
layout.setSizeConstraint(QLayout.SizeConstraint.SetFixedSize)

self._button_layout = QHBoxLayout()

Expand Down
4 changes: 2 additions & 2 deletions src/ert/gui/tools/workflows/run_workflow_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ def workflowFinishedWithFail(self) -> None:

QMessageBox.critical(self, title_text, content_text)
if self._running_workflow_dialog is not None:
self._running_workflow_dialog.accept()
self._running_workflow_dialog.reject()
self._running_workflow_dialog = None

def workflowStoppedByUser(self) -> None:
Expand All @@ -195,5 +195,5 @@ def workflowStoppedByUser(self) -> None:
f"The workflow '{workflow_name}' was killed successfully!",
)
if self._running_workflow_dialog is not None:
self._running_workflow_dialog.accept()
self._running_workflow_dialog.reject()
self._running_workflow_dialog = None

0 comments on commit a70084c

Please sign in to comment.