diff --git a/src/help.cpp b/src/help.cpp index 353dde64e..f889f24ef 100644 --- a/src/help.cpp +++ b/src/help.cpp @@ -18,13 +18,15 @@ Help::Help(QObject *parent): QObject(parent),texDocSystem(0) */ void Help::execTexdocDialog(const QStringList &packages, const QString &defaultPackage) { - TexdocDialog dialog(nullptr,this); + TexdocDialog dialog(nullptr,this); dialog.setPackageNames(packages); + if (packages.count()==0) { + mShowAllPackages = true; + } + dialog.setShowAllPackages(mShowAllPackages); if (!defaultPackage.isEmpty()) { dialog.setPreferredPackage(defaultPackage); - }else{ - dialog.setShowAllPackages(mShowAllPackages); - } + } if (dialog.exec()) { viewTexdoc(dialog.selectedPackage()); } diff --git a/src/texdocdialog.cpp b/src/texdocdialog.cpp index ac86e572d..fe6a28c51 100644 --- a/src/texdocdialog.cpp +++ b/src/texdocdialog.cpp @@ -182,9 +182,7 @@ void TexdocDialog::itemChanged(QTableWidgetItem* item) void TexdocDialog::setPackageNames(const QStringList &packages) { m_packages=packages; - if (m_packages.count()==0){ - ui->cbShowAllPackages->setChecked(true); // regenerateTable will be called by the stateChanged signal - }else{ + if (m_packages.count()>0){ regenerateTable(); } }