From 89d42a68f5af24c73115ccddb72adc84587c690c Mon Sep 17 00:00:00 2001 From: Juergen Spitzmueller Date: Sat, 16 May 2020 10:31:48 +0200 Subject: [PATCH] Disable bookmarksopenlevel SL when bookmarksopen is false Fixes #11289 (cherry picked from commit f2243a3bc72b896ac0dad3499d60c47b9bd4e251) --- src/frontends/qt4/GuiDocument.cpp | 10 ++++++++++ src/frontends/qt4/GuiDocument.h | 1 + status.23x | 3 +++ 3 files changed, 14 insertions(+) diff --git a/src/frontends/qt4/GuiDocument.cpp b/src/frontends/qt4/GuiDocument.cpp index 307703d322..544e52d83c 100644 --- a/src/frontends/qt4/GuiDocument.cpp +++ b/src/frontends/qt4/GuiDocument.cpp @@ -1558,6 +1558,8 @@ GuiDocument::GuiDocument(GuiView & lv) this, SLOT(change_adaptor())); connect(pdfSupportModule->bookmarksopenGB, SIGNAL(toggled(bool)), this, SLOT(change_adaptor())); + connect(pdfSupportModule->bookmarksopenGB, SIGNAL(toggled(bool)), + this, SLOT(bookmarksopenChanged(bool))); connect(pdfSupportModule->bookmarksopenlevelSB, SIGNAL(valueChanged(int)), this, SLOT(change_adaptor())); connect(pdfSupportModule->breaklinksCB, SIGNAL(toggled(bool)), @@ -1680,6 +1682,12 @@ void GuiDocument::shellescapeChanged() changed(); } +void GuiDocument::bookmarksopenChanged(bool state) +{ + pdfSupportModule->bookmarksopenlevelSB->setEnabled(state); + pdfSupportModule->bookmarksopenlevelLA->setEnabled(state); +} + void GuiDocument::slotApply() { @@ -4028,6 +4036,8 @@ void GuiDocument::paramsToDialog() pdfSupportModule->bookmarksopenGB->setChecked(pdf.bookmarksopen); pdfSupportModule->bookmarksopenlevelSB->setValue(pdf.bookmarksopenlevel); + pdfSupportModule->bookmarksopenlevelSB->setEnabled(pdf.bookmarksopen); + pdfSupportModule->bookmarksopenlevelLA->setEnabled(pdf.bookmarksopen); pdfSupportModule->breaklinksCB->setChecked(pdf.breaklinks); pdfSupportModule->pdfborderCB->setChecked(pdf.pdfborder); diff --git a/src/frontends/qt4/GuiDocument.h b/src/frontends/qt4/GuiDocument.h index 04e22c3968..49e935b00f 100644 --- a/src/frontends/qt4/GuiDocument.h +++ b/src/frontends/qt4/GuiDocument.h @@ -154,6 +154,7 @@ private Q_SLOTS: void allPackagesAuto(); void allPackagesAlways(); void allPackagesNot(); + void bookmarksopenChanged(bool); private: /// validate listings parameters and return an error message, if any QString validateListingsParameters(); diff --git a/status.23x b/status.23x index d634b07da0..11c909251b 100644 --- a/status.23x +++ b/status.23x @@ -130,6 +130,9 @@ What's new - Don't close a document if the "close or hide" dialog is canceled (bug 11456). + +- Disable PDF bookmarksopen level widget if booksmarksopen is false + (bug 11289). * INTERNALS