Skip to content

Commit

Permalink
remarks
Browse files Browse the repository at this point in the history
  • Loading branch information
aat301 committed Nov 13, 2016
1 parent d0c26c3 commit 78b495c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
10 changes: 7 additions & 3 deletions dialogs/helpdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,14 @@ HelpDialog::HelpDialog(const QString& path, const QString& page, QWidget* parent

void HelpDialog::showPage(const QString& path, const QString& page, QWidget* parent)
{
HelpDialog *helpDialog = new HelpDialog(path, page, parent);
helpDialog->exec();

QSettings settings;
bool hideHelpDialog = settings.value("hideHelpDialog", false).toBool();
if (!hideHelpDialog){
HelpDialog *helpDialog = new HelpDialog(path, page, parent);
helpDialog->exec();
}
}

void HelpDialog::checkBoxToggled(bool checked)
{
QSettings settings;
Expand Down
6 changes: 1 addition & 5 deletions mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -538,9 +538,5 @@ void MainWindow::closeEvent(QCloseEvent *event)
}

void MainWindow::slotActionHelp(){
QSettings settings;
bool showHelpDialog = settings.value("hideHelpDialog","true").toBool();
if (showHelpDialog){
HelpDialog::showPage("qrc:/docs","/usage_tips.html", this);
}
HelpDialog::showPage("qrc:/docs","/usage_tips.html", this);
}

0 comments on commit 78b495c

Please sign in to comment.