]> git.lyx.org Git - features.git/commitdiff
Initialize row preperly on clear()
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Wed, 22 May 2019 09:53:58 +0000 (11:53 +0200)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Wed, 22 May 2019 09:56:14 +0000 (11:56 +0200)
It is not enough to get rid of the row elements, obviously. In
particular, changebar_ may never get reset.

Fixes bug #11396.

src/Row.h

index 01c62cf266a30064a62f20b4bca8a25c2d73185c..e4a8e689b6a72bfefd8a672127a50bce48fe2a9b 100644 (file)
--- a/src/Row.h
+++ b/src/Row.h
@@ -262,7 +262,7 @@ public:
        /// remove last element
        void pop_back();
        /// remove all row elements
-       void clear() { elements_.clear(); }
+       void clear() { *this = Row(); }
        /**
         * if row width is too large, remove all elements after last
         * separator and update endpos if necessary. If all that