ui: reset live parameters and delay when reset calibration pressed (#35211)

* Reset params and lag too

* Old param too
This commit is contained in:
Kacper Rączy
2025-05-14 04:22:44 +02:00
committed by GitHub
parent 98c4a4582b
commit 1a3e342303
+5 -2
View File
@@ -194,6 +194,9 @@ DevicePanel::DevicePanel(SettingsWindow *parent) : ListWidget(parent) {
if (ConfirmationDialog::confirm(tr("Are you sure you want to reset calibration?"), tr("Reset"), this)) {
params.remove("CalibrationParams");
params.remove("LiveTorqueParameters");
params.remove("LiveParameters");
params.remove("LiveParametersV2");
params.remove("LiveDelay");
}
});
addItem(resetCalibBtn);
@@ -326,7 +329,7 @@ void SettingsWindow::setCurrentPanel(int index, const QString &param) {
if (param.endsWith("Panel")) {
QString panelName = param;
panelName.chop(5); // Remove "Panel" suffix
// Find the panel by name
for (int i = 0; i < nav_btns->buttons().size(); i++) {
if (nav_btns->buttons()[i]->text() == tr(panelName.toStdString().c_str())) {
@@ -338,7 +341,7 @@ void SettingsWindow::setCurrentPanel(int index, const QString &param) {
emit expandToggleDescription(param);
}
}
panel_widget->setCurrentIndex(index);
nav_btns->buttons()[index]->setChecked(true);
}