move the param deletion
This commit is contained in:
parent
a36de69f26
commit
31d8a65f00
|
@ -41,6 +41,7 @@ void TrainingGuide::mouseReleaseEvent(QMouseEvent *e) {
|
||||||
void TrainingGuide::reset(){
|
void TrainingGuide::reset(){
|
||||||
currentIndex = 0;
|
currentIndex = 0;
|
||||||
image.load("../assets/training/step0.jpg");
|
image.load("../assets/training/step0.jpg");
|
||||||
|
Params().delete_db_value("CompletedTrainingVersion");
|
||||||
}
|
}
|
||||||
|
|
||||||
TrainingGuide::TrainingGuide(QWidget* parent) : QFrame(parent){
|
TrainingGuide::TrainingGuide(QWidget* parent) : QFrame(parent){
|
||||||
|
@ -60,7 +61,6 @@ void TrainingGuide::paintEvent(QPaintEvent *event) {
|
||||||
}
|
}
|
||||||
|
|
||||||
TermsPage::TermsPage(QWidget *parent) : QFrame(parent){
|
TermsPage::TermsPage(QWidget *parent) : QFrame(parent){
|
||||||
|
|
||||||
QVBoxLayout *main_layout = new QVBoxLayout;
|
QVBoxLayout *main_layout = new QVBoxLayout;
|
||||||
main_layout->setMargin(40);
|
main_layout->setMargin(40);
|
||||||
main_layout->setSpacing(40);
|
main_layout->setSpacing(40);
|
||||||
|
@ -120,7 +120,6 @@ void OnboardingWindow::updateActiveScreen() {
|
||||||
if (!accepted_terms) {
|
if (!accepted_terms) {
|
||||||
setCurrentIndex(0);
|
setCurrentIndex(0);
|
||||||
} else if (!training_done) {
|
} else if (!training_done) {
|
||||||
emit resetTrainingGuide();
|
|
||||||
setCurrentIndex(1);
|
setCurrentIndex(1);
|
||||||
} else {
|
} else {
|
||||||
emit onboardingDone();
|
emit onboardingDone();
|
||||||
|
|
|
@ -64,7 +64,6 @@ private:
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void onboardingDone();
|
void onboardingDone();
|
||||||
void resetTrainingGuide();
|
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void updateActiveScreen();
|
void updateActiveScreen();
|
||||||
|
|
|
@ -114,7 +114,6 @@ DevicePanel::DevicePanel(QWidget* parent) : QWidget(parent) {
|
||||||
"Review the rules, features, and limitations of openpilot",
|
"Review the rules, features, and limitations of openpilot",
|
||||||
[=]() {
|
[=]() {
|
||||||
if (ConfirmationDialog::confirm("Are you sure you want to review the training guide?")) {
|
if (ConfirmationDialog::confirm("Are you sure you want to review the training guide?")) {
|
||||||
Params().delete_db_value("CompletedTrainingVersion");
|
|
||||||
emit reviewTrainingGuide();
|
emit reviewTrainingGuide();
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
|
|
Loading…
Reference in a new issue