git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8908 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
André Pönitz 2004-08-13 19:19:24 +00:00
parent 9e20808369
commit 0ea9ce5341
2 changed files with 11 additions and 9 deletions

View File

@ -368,13 +368,12 @@ void MathHullInset::addPreview(lyx::graphics::PreviewLoader & ploader) const
void MathHullInset::notifyCursorLeaves(LCursor & cur)
{
if (RenderPreview::status() != LyXRC::PREVIEW_ON)
return;
Buffer const & buffer = cur.buffer();
string const snippet = latex_string(*this);
preview_->addPreview(snippet, buffer);
preview_->startLoading(buffer);
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);
new_label = lyx::support::trim(res.second);
if (res.first)
new_label = lyx::support::trim(res.second);
else
new_label = old_label;
}
if (!new_label.empty())

View File

@ -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);