mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-18 21:45:24 +00:00
MathData: fix #6388 also for branch
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@33103 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
cfe7299192
commit
66ad612769
@ -415,6 +415,9 @@ void MathData::updateMacros(Cursor * cur, MacroContext const & mc)
|
||||
|| newDisplayMode == MathMacro::DISPLAY_UNFOLDED)) {
|
||||
|
||||
detachMacroParameters(cur, i);
|
||||
// FIXME: proper anchor handling, this removes the selection
|
||||
if (cur)
|
||||
cur->clearSelection();
|
||||
}
|
||||
|
||||
// the macro could have been copied while resizing this
|
||||
@ -473,10 +476,9 @@ void MathData::updateMacros(Cursor * cur, MacroContext const & mc)
|
||||
}
|
||||
|
||||
|
||||
void MathData::detachMacroParameters(Cursor * cur, const size_type macroPos)
|
||||
void MathData::detachMacroParameters(DocIterator * cur, const size_type macroPos)
|
||||
{
|
||||
MathMacro * macroInset = operator[](macroPos).nucleus()->asMacro();
|
||||
Buffer * buf = &cur->buffer();
|
||||
|
||||
// detach all arguments
|
||||
vector<MathData> detachedArgs;
|
||||
@ -531,7 +533,7 @@ void MathData::detachMacroParameters(Cursor * cur, const size_type macroPos)
|
||||
for (size_t q = 0; q < arg.size(); ++q) {
|
||||
if (arg[q]->getChar() == ']') {
|
||||
// put brace
|
||||
brace = new InsetMathBrace(buf);
|
||||
brace = new InsetMathBrace(buffer_);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -592,11 +594,8 @@ void MathData::detachMacroParameters(Cursor * cur, const size_type macroPos)
|
||||
++(*cur)[curMacroSlice - 1].pos();
|
||||
}
|
||||
|
||||
if (cur) {
|
||||
// FIXME: proper anchor handling, this removes the selection
|
||||
cur->clearSelection();
|
||||
if (cur)
|
||||
cur->updateInsets(&cur->bottom().inset());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -179,7 +179,7 @@ private:
|
||||
bool find1(MathData const & ar, size_type pos) const;
|
||||
|
||||
///
|
||||
void detachMacroParameters(Cursor * cur, const size_type macroPos);
|
||||
void detachMacroParameters(DocIterator * dit, const size_type macroPos);
|
||||
///
|
||||
void attachMacroParameters(Cursor * cur, const size_type macroPos,
|
||||
const size_type macroNumArgs, const int macroOptionals,
|
||||
|
@ -83,6 +83,9 @@ What's new
|
||||
|
||||
* DOCUMENT INPUT/OUTPUT
|
||||
|
||||
- Fix crash when vieving files that contain math macros as PDF
|
||||
(bug 6388).
|
||||
|
||||
- Export the image when generating a preview, after an image
|
||||
reload (bug 6356).
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user