mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-28 06:49:43 +00:00
Revert "Implement on screen numbering for Subequation module"
This reverts commit c6f35b6ad6
.
This commit is contained in:
parent
1fc08f57e1
commit
f5c7acb140
@ -421,16 +421,6 @@ void Counters::reset(docstring const & match)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool Counters::copy(docstring const & cnt, docstring const & newcnt)
|
|
||||||
{
|
|
||||||
auto const it = counterList_.find(cnt);
|
|
||||||
if (it == counterList_.end())
|
|
||||||
return false;
|
|
||||||
counterList_[newcnt] = it->second;
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
bool Counters::remove(docstring const & cnt)
|
bool Counters::remove(docstring const & cnt)
|
||||||
{
|
{
|
||||||
bool retval = counterList_.erase(cnt);
|
bool retval = counterList_.erase(cnt);
|
||||||
|
@ -162,8 +162,6 @@ public:
|
|||||||
void reset();
|
void reset();
|
||||||
/// Reset counters matched by match string.
|
/// Reset counters matched by match string.
|
||||||
void reset(docstring const & match);
|
void reset(docstring const & match);
|
||||||
/// Copy counter \p cnt to \p newcnt.
|
|
||||||
bool copy(docstring const & cnt, docstring const & newcnt);
|
|
||||||
/// Remove counter \p cnt.
|
/// Remove counter \p cnt.
|
||||||
bool remove(docstring const & cnt);
|
bool remove(docstring const & cnt);
|
||||||
/** returns the expanded string representation of counter \c
|
/** returns the expanded string representation of counter \c
|
||||||
|
@ -24,7 +24,6 @@
|
|||||||
#include "ParIterator.h"
|
#include "ParIterator.h"
|
||||||
#include "TextClass.h"
|
#include "TextClass.h"
|
||||||
|
|
||||||
#include "support/debug.h"
|
|
||||||
#include "support/gettext.h"
|
#include "support/gettext.h"
|
||||||
#include "support/lstrings.h"
|
#include "support/lstrings.h"
|
||||||
|
|
||||||
@ -150,29 +149,6 @@ void InsetFlex::updateBuffer(ParIterator const & it, UpdateType utype, bool cons
|
|||||||
docstring custom_label = translateIfPossible(il.labelstring());
|
docstring custom_label = translateIfPossible(il.labelstring());
|
||||||
|
|
||||||
Counters & cnts = bp.documentClass().counters();
|
Counters & cnts = bp.documentClass().counters();
|
||||||
|
|
||||||
// Special case for `subequations' module.
|
|
||||||
if (il.latextype() == InsetLaTeXType::ENVIRONMENT &&
|
|
||||||
il.latexname() == "subequations") {
|
|
||||||
docstring equation(from_ascii("equation"));
|
|
||||||
docstring parentequation(from_ascii("parentequation"));
|
|
||||||
cnts.step(equation, utype);
|
|
||||||
// save a copy of the equation counter definition
|
|
||||||
cnts.copy(equation, parentequation);
|
|
||||||
// redefine the equation counter definition
|
|
||||||
docstring const eqlabel =
|
|
||||||
cnts.theCounter(equation, it->getParLanguage(bp)->code());
|
|
||||||
cnts.newCounter(equation, parentequation,
|
|
||||||
eqlabel + from_ascii("\\alph{equation}"),
|
|
||||||
eqlabel + from_ascii("\\alph{equation}"),
|
|
||||||
cnts.guiName(parentequation));
|
|
||||||
InsetCollapsible::updateBuffer(it, utype, deleted);
|
|
||||||
// reset equation counter as it was.
|
|
||||||
cnts.copy(parentequation, equation);
|
|
||||||
cnts.remove(parentequation);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
docstring const & count = il.counter();
|
docstring const & count = il.counter();
|
||||||
bool const have_counter = cnts.hasCounter(count);
|
bool const have_counter = cnts.hasCounter(count);
|
||||||
if (have_counter) {
|
if (have_counter) {
|
||||||
|
Loading…
Reference in New Issue
Block a user