#include "insets/InsetQuotes.h"
#include "insets/InsetSpecialChar.h"
#include "insets/InsetText.h"
-#include "insets/InsetInfo.h"
#include "insets/InsetGraphics.h"
#include "insets/InsetGraphicsParams.h"
if (!ins)
break;
- cur.recordUndoFullDocument();
+ cur.recordUndo();
string id = to_utf8(cmd.argument());
string grp = graphics::getGroupParams(bv->buffer(), id);
// Single-click on work area
case LFUN_MOUSE_PRESS:
// We are not marking a selection with the keyboard in any case.
- cur.bv().cursor().mark() = false;
+ cur.bv().cursor().setMark(false);
switch (cmd.button()) {
case mouse_button::button1:
// Set the cursor
// We continue with our existing selection or start a new one, so don't
// reset the anchor.
bvcur.setCursor(cur);
- bvcur.selection() = true;
+ bvcur.setSelection(true);
if (cur.top() == old) {
// We didn't move one iota, so no need to update the screen.
cur.updateFlags(Update::SinglePar | Update::FitCursor);
// selectWord but bvcur is current
// mouse position.
cur.bv().cursor().setSelection();
- }
+ // We might have removed an empty but drawn selection
+ // (probably a margin)
+ cur.updateFlags(Update::SinglePar | Update::FitCursor);
+ } else
+ cur.noUpdate();
// FIXME: We could try to handle drag and drop of selection here.
- cur.noUpdate();
return;
case mouse_button::button2:
// add a separate paragraph for the caption inset
pars.push_back(Paragraph());
- pars.back().setInsetOwner(pars[0].inInset());
+ pars.back().setInsetOwner(&pars[0].inInset());
pars.back().setPlainOrDefaultLayout(tclass);
int cap_pit = pars.size() - 1;
// the graphics (or table).
if (!content) {
pars.push_back(Paragraph());
- pars.back().setInsetOwner(pars[0].inInset());
+ pars.back().setInsetOwner(&pars[0].inInset());
pars.back().setPlainOrDefaultLayout(tclass);
}
cur.push(*inset);
cur.top().pos() = cur.top().lastpos();
cur.resetAnchor();
- cur.selection() = true;
+ cur.setSelection(true);
cur.top().pos() = 0;
}
break;
break;
}
- case LFUN_FONT_BOLD: {
+ case LFUN_FONT_BOLD:
+ case LFUN_FONT_BOLDSYMBOL: {
Font font(ignore_font, ignore_language);
font.fontInfo().setSeries(BOLD_SERIES);
toggleAndShow(cur, this, font);
case LFUN_ESCAPE:
if (cur.selection()) {
- cur.selection() = false;
+ cur.setSelection(false);
} else {
cur.undispatched();
// This used to be LFUN_FINISHED_RIGHT, I think FORWARD is more
break;
case LFUN_FONT_BOLD:
+ case LFUN_FONT_BOLDSYMBOL:
flag.setOnOff(fontinfo.series() == BOLD_SERIES);
break;