From 492f394571bccb38e10a8053fcd2172863d49a25 Mon Sep 17 00:00:00 2001 From: Martin Vermeer Date: Tue, 10 Jan 2006 12:49:34 +0000 Subject: [PATCH] Fix default label setting (eq:) git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10719 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/mathed/ChangeLog | 4 ++++ src/mathed/math_hullinset.C | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/mathed/ChangeLog b/src/mathed/ChangeLog index d17e15ae70..671fd0f22c 100644 --- a/src/mathed/ChangeLog +++ b/src/mathed/ChangeLog @@ -1,3 +1,7 @@ +2006-01-10 Martin Vermeer + + * math_hullinset (doDispatch): fix default label setting (eq:) + 2006-01-01 * command_inset.C (editXY): unused parameters diff --git a/src/mathed/math_hullinset.C b/src/mathed/math_hullinset.C index c13b2753b3..40808872ec 100644 --- a/src/mathed/math_hullinset.C +++ b/src/mathed/math_hullinset.C @@ -1046,8 +1046,10 @@ void MathHullInset::doDispatch(LCursor & cur, FuncRequest & cmd) string old_label = label(r); string const default_label = (lyxrc.label_init_length >= 0) ? "eq:" : ""; + if (old_label.empty()) + old_label = default_label; string const contents = cmd.argument.empty() ? - label(r) : cmd.argument; + old_label : cmd.argument; InsetCommandParams p("label", contents); string const data = InsetCommandMailer::params2string("label", p);