From b7f632ca1c624e0c81d73d0a03b7d5f8154ab9e5 Mon Sep 17 00:00:00 2001 From: Richard Kimberly Heck Date: Tue, 13 Oct 2020 19:51:10 -0400 Subject: [PATCH] Fix bug #12002. Patch from Daniel. --- src/insets/InsetCounter.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/insets/InsetCounter.cpp b/src/insets/InsetCounter.cpp index 4aa109d3ae..4a2cda02e9 100644 --- a/src/insets/InsetCounter.cpp +++ b/src/insets/InsetCounter.cpp @@ -109,19 +109,19 @@ void InsetCounter::latex(otexstream & os, OutputParams const &) const os << "\\setcounter{" << cntr << "}{0}"; } else if (cmd == "save") { cnts.saveValue(cntr); - os << "\\setcounter{" << lyxSaveCounter() + os << "\\setcounter{" << lyxSaveCounter() << "}{\\value{" << cntr << "}}"; } else if (cmd == "restore") { cnts.restoreValue(cntr); os << "\\setcounter{" << cntr - << "{\\value{" << lyxSaveCounter() << "}}"; + << "}{\\value{" << lyxSaveCounter() << "}}"; } } void InsetCounter::toString(odocstream & os) const { - os << "[Counter " << from_utf8(getCmdName()) << ": " + os << "[Counter " << from_utf8(getCmdName()) << ": " << getParam("counter") << "]"; } @@ -228,7 +228,7 @@ void InsetCounter::updateBuffer(ParIterator const &, UpdateType, bool const) screen_label_ = bformat(_("Counter: Add to %1$s"), guiname); tooltip_ = bformat(_("Add %1$s to value of counter %2$s"), val, cntr); } else if (cmd == "reset") { - cnts.reset(cntr); + cnts.reset(cntr); screen_label_ = bformat(_("Counter: Reset %1$s"), guiname); tooltip_ = bformat(_("Reset value of counter %1$s"), cntr); } else if (cmd == "save") { @@ -262,8 +262,8 @@ void InsetCounter::validate(LaTeXFeatures & features) const } -string InsetCounter::contextMenuName() const -{ - return "context-counter"; +string InsetCounter::contextMenuName() const +{ + return "context-counter"; } } // namespace lyx -- 2.39.2