From d87c5c062b56505eb19ff68a600f3555d3e1b3d7 Mon Sep 17 00:00:00 2001 From: Stefan Schimanski Date: Mon, 3 Mar 2008 15:21:13 +0000 Subject: [PATCH] * Update::SinglePar should be enough for most cases. In notifyCursorLeaves though we might need a fullscreen redraw if we don't add more clever checks whether the cursors moved to another paragraph. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23415 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/mathed/MathMacro.cpp | 16 ++++++++-------- src/mathed/MathMacroTemplate.cpp | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/mathed/MathMacro.cpp b/src/mathed/MathMacro.cpp index 76925a1d77..96e75ae414 100644 --- a/src/mathed/MathMacro.cpp +++ b/src/mathed/MathMacro.cpp @@ -437,7 +437,7 @@ void MathMacro::draw(PainterInfo & pi, int x, int y) const // edit mode changed? if (editing_[pi.base.bv] != editMode(pi.base.bv)) - pi.base.bv->cursor().updateFlags(Update::Force); + pi.base.bv->cursor().updateFlags(Update::SinglePar); } @@ -514,7 +514,7 @@ void MathMacro::validate(LaTeXFeatures & features) const void MathMacro::edit(Cursor & cur, bool front, EntryDirection entry_from) { - cur.updateFlags(Update::Force); + cur.updateFlags(Update::SinglePar); InsetMathNest::edit(cur, front, entry_from); } @@ -523,7 +523,7 @@ Inset * MathMacro::editXY(Cursor & cur, int x, int y) { // We may have 0 arguments, but InsetMathNest requires at least one. if (nargs() > 0) { - cur.updateFlags(Update::Force); + cur.updateFlags(Update::SinglePar); return InsetMathNest::editXY(cur, x, y); } else return this; @@ -595,14 +595,14 @@ void MathMacro::attachArguments(vector const & args, size_t arity, int bool MathMacro::idxFirst(Cursor & cur) const { - cur.updateFlags(Update::Force); + cur.updateFlags(Update::SinglePar); return InsetMathNest::idxFirst(cur); } bool MathMacro::idxLast(Cursor & cur) const { - cur.updateFlags(Update::Force); + cur.updateFlags(Update::SinglePar); return InsetMathNest::idxLast(cur); } @@ -618,7 +618,7 @@ void MathMacro::fold(Cursor & cur) { if (!nextFoldMode_) { nextFoldMode_ = true; - cur.updateFlags(Update::Force); + cur.updateFlags(Update::SinglePar); } } @@ -627,7 +627,7 @@ void MathMacro::unfold(Cursor & cur) { if (nextFoldMode_) { nextFoldMode_ = false; - cur.updateFlags(Update::Force); + cur.updateFlags(Update::SinglePar); } } @@ -799,7 +799,7 @@ bool MathMacro::insertCompletion(Cursor & cur, docstring const & s, docstring newName = name() + s; asArray(newName, cell(0)); cur.bv().cursor().pos() = name().size(); - cur.updateFlags(Update::Force); + cur.updateFlags(Update::SinglePar); // finish macro if (finished) { diff --git a/src/mathed/MathMacroTemplate.cpp b/src/mathed/MathMacroTemplate.cpp index f439d1fc3b..d946fcd265 100644 --- a/src/mathed/MathMacroTemplate.cpp +++ b/src/mathed/MathMacroTemplate.cpp @@ -610,7 +610,7 @@ void MathMacroTemplate::draw(PainterInfo & pi, int x, int y) const void MathMacroTemplate::edit(Cursor & cur, bool front, EntryDirection entry_from) { updateLook(true); - cur.updateFlags(Update::Force); + cur.updateFlags(Update::SinglePar); InsetMathNest::edit(cur, front, entry_from); } -- 2.39.2