From d0bec83a2777eba32f1142174533e1975333b956 Mon Sep 17 00:00:00 2001 From: octaeder <102688820+octaeder@users.noreply.github.com> Date: Thu, 19 Dec 2024 22:34:05 +0100 Subject: [PATCH] TexDoc dialog check all packages without packages --- src/help.cpp | 10 ++++++---- src/texdocdialog.cpp | 4 +--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/help.cpp b/src/help.cpp index 353dde64ec..f889f24ef8 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 ac86e572de..fe6a28c51f 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(); } }