mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-12 16:50:39 +00:00
Remove unwanted clearSelection()s in MathData::updateMacros(). These calls broke text selection with keyboard and mouse, search-and-replace, restoring selection after Undo, etc. in a document with math macros since 1.6.0. (Regression at6aa54673
and12314897
) I do not know the purpose of these calls, but the selection code has been worked on since, and I cannot produce undesired behaviour after removing them. (cherry-picked from89342f2946
Conflicts: src/mathed/MathData.cpp )
This commit is contained in:
parent
b056358362
commit
4b62267814
@ -431,13 +431,8 @@ void MathData::updateMacros(Cursor * cur, MacroContext const & mc,
|
|||||||
if (oldDisplayMode == MathMacro::DISPLAY_NORMAL
|
if (oldDisplayMode == MathMacro::DISPLAY_NORMAL
|
||||||
&& (macroInset->arity() != macroNumArgs
|
&& (macroInset->arity() != macroNumArgs
|
||||||
|| macroInset->optionals() != macroOptionals
|
|| macroInset->optionals() != macroOptionals
|
||||||
|| newDisplayMode == MathMacro::DISPLAY_UNFOLDED)) {
|
|| newDisplayMode == MathMacro::DISPLAY_UNFOLDED))
|
||||||
|
|
||||||
detachMacroParameters(cur, i);
|
detachMacroParameters(cur, i);
|
||||||
// FIXME: proper anchor handling, this removes the selection
|
|
||||||
if (cur)
|
|
||||||
cur->clearSelection();
|
|
||||||
}
|
|
||||||
|
|
||||||
// the macro could have been copied while resizing this
|
// the macro could have been copied while resizing this
|
||||||
macroInset = operator[](i).nucleus()->asMacro();
|
macroInset = operator[](i).nucleus()->asMacro();
|
||||||
@ -475,12 +470,9 @@ void MathData::updateMacros(Cursor * cur, MacroContext const & mc,
|
|||||||
// attach parameters
|
// attach parameters
|
||||||
attachMacroParameters(cur, i, macroNumArgs, macroOptionals,
|
attachMacroParameters(cur, i, macroNumArgs, macroOptionals,
|
||||||
fromInitToNormalMode, interactive, appetite);
|
fromInitToNormalMode, interactive, appetite);
|
||||||
|
|
||||||
if (cur) {
|
if (cur)
|
||||||
// FIXME: proper anchor handling, this removes the selection
|
|
||||||
cur->updateInsets(&cur->bottom().inset());
|
cur->updateInsets(&cur->bottom().inset());
|
||||||
cur->clearSelection();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Give macro the chance to adapt to new situation.
|
// Give macro the chance to adapt to new situation.
|
||||||
|
10
status.21x
10
status.21x
@ -37,7 +37,9 @@ What's new
|
|||||||
|
|
||||||
* USER INTERFACE
|
* USER INTERFACE
|
||||||
|
|
||||||
- Add \ensuremath to the list of math completions
|
- Add \ensuremath to the list of math completions.
|
||||||
|
|
||||||
|
- The entries in the outliner are no longer truncated at 40 chars. (bug 9579)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -85,6 +87,9 @@ What's new
|
|||||||
|
|
||||||
- Fix a crash with the outliner when switching documents (bug 9754).
|
- Fix a crash with the outliner when switching documents (bug 9754).
|
||||||
|
|
||||||
|
- Repaired selection of text and search-and-replace in the presence of math
|
||||||
|
macros. The selection is no longer cleared unvolontarily. (bugs 6078, 9364)
|
||||||
|
|
||||||
|
|
||||||
* INTERNALS
|
* INTERNALS
|
||||||
|
|
||||||
@ -97,6 +102,9 @@ What's new
|
|||||||
|
|
||||||
- German UserGuide: fix many typos
|
- German UserGuide: fix many typos
|
||||||
|
|
||||||
|
- French: "Rechercher" and "Remplacer" are no longer bound to the same
|
||||||
|
accelerator
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
* LYXHTML
|
* LYXHTML
|
||||||
|
Loading…
Reference in New Issue
Block a user