Skip to content

Commit

Permalink
Call read_design_matrix only when needed
Browse files Browse the repository at this point in the history
  • Loading branch information
xjules committed Oct 9, 2024
1 parent 7f09561 commit 0a58473
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/ert/gui/simulation/ensemble_experiment_panel.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,13 @@ def __init__(

def on_dm_params_clicked(self, design_matrix: DesignMatrix) -> None:
if design_matrix is not None:
design_matrix.read_design_matrix()
df_sample = design_matrix.design_matrix_df
if df_sample is not None and not df_sample.empty:
viewer = DesignMatrixPanel(df_sample)
if design_matrix.design_matrix_df is None:
design_matrix.read_design_matrix()
if (
design_matrix.design_matrix_df is not None
and not design_matrix.design_matrix_df.empty
):
viewer = DesignMatrixPanel(design_matrix.design_matrix_df)
viewer.setMinimumHeight(500)
viewer.setMinimumWidth(1000)
viewer.adjustSize()
Expand Down

0 comments on commit 0a58473

Please sign in to comment.