From c41f48411a5de16af22452b184ef351f7fbe4e58 Mon Sep 17 00:00:00 2001 From: Georg Baum Date: Mon, 9 May 2011 18:56:51 +0000 Subject: [PATCH] Fix bug #7511 by moving the old label instead of creating a new one. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_2_0_X@38671 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/mathed/InsetMathHull.cpp | 13 +++++++------ status.20x | 3 +++ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/mathed/InsetMathHull.cpp b/src/mathed/InsetMathHull.cpp index 686e427407..308ea599ee 100644 --- a/src/mathed/InsetMathHull.cpp +++ b/src/mathed/InsetMathHull.cpp @@ -884,20 +884,21 @@ void InsetMathHull::addRow(row_type row) return; bool numbered = numberedType(); - docstring lab; + // Move the number and raw pointer, do not call label() (bug 7511) + InsetLabel * label = dummy_pointer; + docstring number = empty_docstring(); if (type_ == hullMultline) { if (row + 1 == nrows()) { numbered_[row] = false; - lab = label(row); + swap(label, label_[row]); + swap(number, numbers_[row]); } else numbered = false; } numbered_.insert(numbered_.begin() + row + 1, numbered); - numbers_.insert(numbers_.begin() + row + 1, empty_docstring()); - label_.insert(label_.begin() + row + 1, dummy_pointer); - if (!lab.empty()) - label(row + 1, lab); + numbers_.insert(numbers_.begin() + row + 1, number); + label_.insert(label_.begin() + row + 1, label); InsetMathGrid::addRow(row); } diff --git a/status.20x b/status.20x index c0afeeb1bc..a8d3f80264 100644 --- a/status.20x +++ b/status.20x @@ -71,6 +71,9 @@ What's new - Fix crash relating to outliner and mouse movement. +- Show the correct label after adding a line to an AMS Multline formula (bug + #7511). + * DOCUMENTATION AND LOCALIZATION -- 2.39.5