3737if TYPE_CHECKING :
3838 from pandas import DataFrame
3939 from faslr .common .model import (
40- FSelectionModel ,
40+ FSelectionModelToolbox ,
4141 FSelectionModelWidget
4242 )
4343
@@ -49,18 +49,15 @@ class FAverageBox(QDialog):
4949 Parameters
5050 ----------
5151 parent: Optional[FSelectionModelWidget]
52- The containing widget of the corresponding selection model.
53- selection_model: Optional[FSelectionModel]
54- The corresponding selection model.
52+ The containing toolbox of the corresponding selection model.
5553 title: Optional[str]
5654 The title of the dialog box, overriding the default.
5755 data: Optional[DataFrame]
5856 A dataframe containing the available averages. Overrides extraction of these averages from the database.
5957 """
6058 def __init__ (
6159 self ,
62- parent : Optional [FSelectionModelWidget ],
63- selection_model : Optional [FSelectionModel ] = None ,
60+ parent : Optional [FSelectionModelToolbox ],
6461 title : Optional [str ] = "Available Averages" ,
6562 data : Optional [DataFrame ] = None
6663 ):
@@ -69,9 +66,9 @@ def __init__(
6966
7067 self .layout = QVBoxLayout ()
7168
72- self .parent : FSelectionModelWidget = parent
69+ self .parent : FSelectionModelWidget = parent . parent
7370
74- self .selection_model = selection_model
71+ self .selection_model = self . parent . selection_model
7572
7673 self .model = FAverageModel (
7774 parent = None ,
0 commit comments