Skip to content

Commit

Permalink
TexDoc dialog check all packages without packages
Browse files Browse the repository at this point in the history
  • Loading branch information
octaeder committed Dec 19, 2024
1 parent 3045625 commit d0bec83
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 6 additions & 4 deletions src/help.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
Expand Down
4 changes: 1 addition & 3 deletions src/texdocdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
}
Expand Down

0 comments on commit d0bec83

Please sign in to comment.