]> git.lyx.org Git - features.git/commitdiff
Disable bookmarksopenlevel SL when bookmarksopen is false
authorJuergen Spitzmueller <spitz@lyx.org>
Sat, 16 May 2020 08:31:48 +0000 (10:31 +0200)
committerJuergen Spitzmueller <spitz@lyx.org>
Mon, 18 May 2020 07:15:56 +0000 (09:15 +0200)
Fixes #11289

(cherry picked from commit f2243a3bc72b896ac0dad3499d60c47b9bd4e251)

src/frontends/qt4/GuiDocument.cpp
src/frontends/qt4/GuiDocument.h
status.23x

index 307703d322e0c58b5e0a51a0b985335df2ae6c40..544e52d83c14a04031254dbd6f6c4daab53e026d 100644 (file)
@@ -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);
index 04e22c3968a99eaeeb65c15bd805984fc81202e5..49e935b00ff99df8b2be389293501cb377264e2a 100644 (file)
@@ -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();
index d634b07da05c48d9dcea9a9758ae0518252f6d97..11c909251b961ad5b8d1fdf13d72d72da09c4780 100644 (file)
@@ -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