mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-08 10:51:03 +00:00
fix bug #1562
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8908 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
9e20808369
commit
0ea9ce5341
@ -368,13 +368,12 @@ void MathHullInset::addPreview(lyx::graphics::PreviewLoader & ploader) const
|
||||
|
||||
void MathHullInset::notifyCursorLeaves(LCursor & cur)
|
||||
{
|
||||
if (RenderPreview::status() != LyXRC::PREVIEW_ON)
|
||||
return;
|
||||
|
||||
if (RenderPreview::status() == LyXRC::PREVIEW_ON) {
|
||||
Buffer const & buffer = cur.buffer();
|
||||
string const snippet = latex_string(*this);
|
||||
preview_->addPreview(snippet, buffer);
|
||||
preview_->startLoading(buffer);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -949,7 +948,10 @@ void MathHullInset::priv_dispatch(LCursor & cur, FuncRequest & cmd)
|
||||
pair<bool, string> const res = old_label.empty()
|
||||
? Alert::askForText(_("Enter new label to insert:"), default_label)
|
||||
: Alert::askForText(_("Enter label:"), old_label);
|
||||
if (res.first)
|
||||
new_label = lyx::support::trim(res.second);
|
||||
else
|
||||
new_label = old_label;
|
||||
}
|
||||
|
||||
if (!new_label.empty())
|
||||
|
@ -560,7 +560,7 @@ void MathScriptInset::notifyCursorLeaves(LCursor & cur)
|
||||
lyxerr << "MathScriptInset::notifyCursorLeaves: 1 " << cur << endl;
|
||||
|
||||
// remove empty scripts if possible
|
||||
if (0) {
|
||||
if (1) {
|
||||
if (nargs() > 2 && cur.idx() == 2 && cell(2).empty()) {
|
||||
// must be a subscript...
|
||||
removeScript(false);
|
||||
|
Loading…
Reference in New Issue
Block a user