|| 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
}
-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;
for (size_t q = 0; q < arg.size(); ++q) {
if (arg[q]->getChar() == ']') {
// put brace
- brace = new InsetMathBrace(buf);
+ brace = new InsetMathBrace(buffer_);
break;
}
}
++(*cur)[curMacroSlice - 1].pos();
}
- if (cur) {
- // FIXME: proper anchor handling, this removes the selection
- cur->clearSelection();
+ if (cur)
cur->updateInsets(&cur->bottom().inset());
- }
}
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,