Oops -- cut off wrong part of label

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19771 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Martin Vermeer 2007-08-24 14:42:41 +00:00
parent 540f3564f0
commit 89287ef7ee

View File

@ -138,11 +138,11 @@ bool InsetCharStyle::metrics(MetricsInfo & mi, Dimension & dim) const
if (status() == Open) {
// FIXME UNICODE
docstring s(from_utf8(params_.name));
if (undefined())
s = _("Undef: ") + s;
// Chop off prefix:
if (s.find(':') != string::npos)
s = s.substr(s.find(':'));
if (undefined())
s = _("Undef: ") + s;
layout_.labelstring = s;
}
return changed;
@ -164,11 +164,11 @@ void InsetCharStyle::draw(PainterInfo & pi, int x, int y) const
if (status() == Open) {
// FIXME UNICODE
docstring s(from_utf8(params_.name));
if (undefined())
s = _("Undef: ") + s;
// Chop off prefix:
if (s.find(':') != string::npos)
s = s.substr(s.find(':'));
if (undefined())
s = _("Undef: ") + s;
layout_.labelstring = s;
}
}