commit 5018e1077b57738cca8daf84f104e5285c87a5eb
Author: Richard Heck <[email protected]>
Date: Sun Aug 28 00:02:43 2016 -0400
producesOutput() should not be redeclared as producesOutput(bool).
---
src/insets/InsetBranch.cpp | 11 ++++++-----
src/insets/InsetBranch.h | 2 +-
2 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/src/insets/InsetBranch.cpp b/src/insets/InsetBranch.cpp
index 073072b..e22555b 100644
--- a/src/insets/InsetBranch.cpp
+++ b/src/insets/InsetBranch.cpp
@@ -77,8 +77,9 @@ docstring InsetBranch::toolTip(BufferView const & bv, int,
int) const
docstring const masteron = producesOutput() ?
_("on") : _("off");
- docstring const childon = producesOutput(true) ?
- _("on") : _("off");
+ docstring const childon =
+ (isBranchSelected(true) != params_.inverted) ?
+ _("on") : _("off");
docstring const onoff = (masteron == childon) ?
masteron :
support::bformat(_("master %1$s, child %2$s"),
@@ -105,7 +106,7 @@ docstring const InsetBranch::buttonLabel(BufferView const
&) const
bool const inchild =
buffer().params().branchlist().find(params_.branch);
bool const master_selected = producesOutput();
- bool const child_selected = producesOutput(true);
+ bool const child_selected = isBranchSelected(true) != params_.inverted;
docstring symb = docstring(1, master_selected ? tick : cross);
if (inchild && master_selected != child_selected)
@@ -284,9 +285,9 @@ bool InsetBranch::isBranchSelected(bool const child) const
}
-bool InsetBranch::producesOutput(bool const child) const
+bool InsetBranch::producesOutput() const
{
- return isBranchSelected(child) != params_.inverted;
+ return isBranchSelected() != params_.inverted;
}
diff --git a/src/insets/InsetBranch.h b/src/insets/InsetBranch.h
index afb07d1..83783e7 100644
--- a/src/insets/InsetBranch.h
+++ b/src/insets/InsetBranch.h
@@ -103,7 +103,7 @@ private:
* Note that Branch insets are considered part of the
* document when they are selected XOR inverted.
*/
- bool producesOutput(bool const child = false) const;
+ bool producesOutput() const;
///
bool getStatus(Cursor &, FuncRequest const &, FuncStatus &) const;
///