]> git.lyx.org Git - lyx.git/blobdiff - src/Counters.cpp
Fix bug #12772
[lyx.git] / src / Counters.cpp
index 519cb2734668e9a39c440bec0236d5208cde0919..0133f76bcab455f876c0f05631641313d09dfe32 100644 (file)
@@ -421,6 +421,16 @@ 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 retval = counterList_.erase(cnt);