Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
JHolba committed Jan 3, 2025
1 parent d1aa80f commit 3d745d7
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/ert/gui/model/snapshot.py
Original file line number Diff line number Diff line change
@@ -471,7 +471,7 @@ def _fm_step_data(
if role == FileRole:
data_name = FM_STEP_COLUMNS[index.column()]
if data_name in {ids.STDOUT, ids.STDERR}:
return node.data.get(data_name, None)
return node.data.get(data_name)

if role == RealIens:
return node.parent.id_ if node.parent else None
10 changes: 5 additions & 5 deletions src/ert/gui/tools/plot/customize/customize_plot_dialog.py
Original file line number Diff line number Diff line change
@@ -203,8 +203,8 @@ def __init__(
self.current_key = key
self._key_defs = key_defs

self.setWindowFlags(self.windowFlags() & ~Qt.WindowContextHelpButtonHint) # type: ignore
self.setWindowFlags(self.windowFlags() & ~Qt.WindowCloseButtonHint) # type: ignore
self.setWindowFlag(Qt.WindowType.WindowContextHelpButtonHint, False)
self.setWindowFlag(Qt.WindowType.WindowCloseButtonHint, False)

self._tab_map: dict[str, CustomizationView] = {}
self._tab_order: list[str] = []
@@ -295,13 +295,13 @@ def keySelected(self, list_widget_item: QListWidgetItem) -> None:
def currentPlotKeyChanged(self, new_key: str | None) -> None:
self.current_key = new_key

def keyPressEvent(self, arg__1: QKeyEvent | None) -> None:
def keyPressEvent(self, arg__1: QKeyEvent) -> None:
# Hide when pressing Escape instead of QDialog.keyPressEvent(KeyEscape)
# which closes the dialog
if arg__1 is not None and arg__1.key() == Qt.Key.Key_Escape:
if arg__1.key() == Qt.Key.Key_Escape:
self.hide()
else:
QDialog.keyPressEvent(self, arg__1) # type: ignore[arg-type]
QDialog.keyPressEvent(self, arg__1)

def addTab(
self, attribute_name: str, title: str, widget: CustomizationView

0 comments on commit 3d745d7

Please sign in to comment.