commit 89d42a68f5af24c73115ccddb72adc84587c690c
Author: Juergen Spitzmueller <[email protected]>
Date:   Sat May 16 10:31:48 2020 +0200

    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(+), 0 deletions(-)

diff --git a/src/frontends/qt4/GuiDocument.cpp 
b/src/frontends/qt4/GuiDocument.cpp
index 307703d..544e52d 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 04e22c3..49e935b 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 d634b07..11c9092 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
-- 
lyx-cvs mailing list
[email protected]
http://lists.lyx.org/mailman/listinfo/lyx-cvs

Reply via email to