]> git.lyx.org Git - features.git/commitdiff
Fix UI quirk in IncludeOnly settings
authorJuergen Spitzmueller <spitz@lyx.org>
Thu, 12 Mar 2020 09:37:56 +0000 (10:37 +0100)
committerJuergen Spitzmueller <spitz@lyx.org>
Fri, 13 Mar 2020 07:45:45 +0000 (08:45 +0100)
Fixes #11564

(cherry picked from commit b568a49593b6d52f267d8fcfbc0a46dc7ecb613d)

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

index 122a4905fe8a6db49ca2a15e7ef501925c3b517f..307703d322e0c58b5e0a51a0b985335df2ae6c40 100644 (file)
@@ -3291,6 +3291,7 @@ void GuiDocument::applyView()
        }
        bp_.maintain_unincluded_children =
                masterChildModule->maintainAuxCB->isChecked();
+       updateIncludeonlyDisplay();
 
        // Float Placement
        bp_.float_placement = floatModule->get();
@@ -3818,6 +3819,7 @@ void GuiDocument::paramsToDialog()
                masterChildModule->setEnabled(true);
                includeonlys_ = bp_.getIncludedChildren();
                updateIncludeonlys();
+               updateIncludeonlyDisplay();
        }
        masterChildModule->maintainAuxCB->setChecked(
                bp_.maintain_unincluded_children);
@@ -4091,12 +4093,8 @@ void GuiDocument::updateSelectedModules()
 }
 
 
-void GuiDocument::updateIncludeonlys()
+void GuiDocument::updateIncludeonlyDisplay()
 {
-       masterChildModule->childrenTW->clear();
-       QString const no = qt_("No");
-       QString const yes = qt_("Yes");
-
        if (includeonlys_.empty()) {
                masterChildModule->includeallRB->setChecked(true);
                masterChildModule->childrenTW->setEnabled(false);
@@ -4106,6 +4104,15 @@ void GuiDocument::updateIncludeonlys()
                masterChildModule->childrenTW->setEnabled(true);
                masterChildModule->maintainAuxCB->setEnabled(true);
        }
+}
+
+
+void GuiDocument::updateIncludeonlys()
+{
+       masterChildModule->childrenTW->clear();
+       QString const no = qt_("No");
+       QString const yes = qt_("Yes");
+
        ListOfBuffers children = buffer().getChildren();
        ListOfBuffers::const_iterator it  = children.begin();
        ListOfBuffers::const_iterator end = children.end();
@@ -4124,17 +4131,10 @@ void GuiDocument::updateIncludeonlys()
                else
                        all_unincluded = false;
        }
-       // Both if all childs are included and if none is included
+       // Both if all children are included and if none is included
        // is equal to "include all" (i.e., omit \includeonly).
-       // Thus, reset the GUI.
-       if (!has_unincluded || all_unincluded) {
-               masterChildModule->includeallRB->setChecked(true);
-               masterChildModule->childrenTW->setEnabled(false);
+       if (!has_unincluded || all_unincluded)
                includeonlys_.clear();
-       }
-       // If all are included, we need to update again.
-       if (!has_unincluded)
-               updateIncludeonlys();
 }
 
 
index dd51bac8c4b8fbe99fecac1f999f5f2ea0e0605e..04e22c3968a99eaeeb65c15bd805984fc81202e5 100644 (file)
@@ -198,6 +198,8 @@ private:
        ///
        void updateSelectedModules();
        ///
+       void updateIncludeonlyDisplay();
+       ///
        void updateIncludeonlys();
        ///
        void updateDefaultBiblio(std::string const & style,
index f06d283f4748e36dd6212cecf23610db5b8df566..9b39a4868632097c7051f48330ccea9f97bb259a 100644 (file)
@@ -72,6 +72,9 @@ What's new
 
 - Fix problem with validation of InsetLayout.
 
+- Fix over-hasty resetting of dialog in Child Documents settings (bug 11564).
+
+
 * INTERNALS