X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FUndo.h;h=6f6cca6e90e968ee46c87d591a27fe97f82fd0a4;hb=a41d589e851a956ff27235841e6330bab552c0fe;hp=59f3ca44fc93a58975ee459ffc9440e5889a5ac1;hpb=cc241bdaaf0f63daf5e1afb4d8623a2f075943e5;p=lyx.git diff --git a/src/Undo.h b/src/Undo.h index 59f3ca44fc..6f6cca6e90 100644 --- a/src/Undo.h +++ b/src/Undo.h @@ -96,6 +96,8 @@ public: void endUndoGroup(); /// end the current undo group and set UndoElement::cur_after if necessary. void endUndoGroup(CursorData const & cur_after); + /// return true if an undo group is open and contains at least one element + bool activeUndoGroup() const; /// The general case: record undo information for an arbitrary range. /** @@ -135,15 +137,9 @@ private: */ class UndoGroupHelper { public: - UndoGroupHelper(Buffer * buf) : buffer_(0) - { - resetBuffer(buf); - } + UndoGroupHelper(Buffer * buf = 0); - ~UndoGroupHelper() - { - resetBuffer(0); - } + ~UndoGroupHelper(); /** Close the current undo group if necessary and create a new one * for buffer \c buf. @@ -151,7 +147,8 @@ public: void resetBuffer(Buffer * buf); private: - Buffer * buffer_; + class Impl; + Impl * const d; };