[Companion] Refactor RawSwitchItemModel and RawSwitchFilterItemModel for better efficiency, does not invalidate whole model on updates (structure is almost identical to the RawSource variants).
This commit is contained in:
@@ -50,7 +50,7 @@ TimerPanel::TimerPanel(QWidget *parent, ModelData & model, TimerData & timer, Ge
|
||||
}
|
||||
|
||||
// Mode
|
||||
rawSwitchItemModel = new RawSwitchFilterItemModel(&generalSettings, &model, TimersContext);
|
||||
rawSwitchItemModel = new RawSwitchFilterItemModel(&generalSettings, &model, RawSwitch::TimersContext, this);
|
||||
ui->mode->setModel(rawSwitchItemModel);
|
||||
ui->mode->setCurrentIndex(ui->mode->findData(timer.mode.toValue()));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user