#include "insets/InsetSpecialChar.h"
#include "insets/InsetText.h"
#include "insets/InsetInfo.h"
+#include "insets/InsetGraphics.h"
+#include "insets/InsetGraphicsParams.h"
#include "support/convert.h"
#include "support/debug.h"
break;
case LFUN_INSET_SETTINGS: {
- // if there is an inset at cursor, access this
- Inset * inset = cur.nextInset();
- if (inset) {
- inset->showInsetDialog(bv);
+ Inset & inset = cur.inset();
+ if (cmd.getArg(0) == insetName(inset.lyxCode())) {
+ // This inset dialog has been explicitely requested.
+ inset.showInsetDialog(bv);
+ break;
+ }
+ // else, if there is an inset at the cursor, access this
+ Inset * next_inset = cur.nextInset();
+ if (next_inset) {
+ next_inset->showInsetDialog(bv);
break;
}
- // if not work, access the underlying inset.
- cur.inset().showInsetDialog(bv);
+ // if not then access the underlying inset.
+ inset.showInsetDialog(bv);
break;
}
+ case LFUN_SET_GRAPHICS_GROUP: {
+ InsetGraphics * ins = InsetGraphics::getCurrentGraphicsInset(cur);
+ if (!ins)
+ break;
+
+ cur.recordUndoFullDocument();
+
+ string id = to_utf8(cmd.argument());
+ string grp = InsetGraphics::getGroupParams(bv->buffer(), id);
+ InsetGraphicsParams tmp, inspar = ins->getParams();
+
+ if (id.empty())
+ inspar.groupId = to_utf8(cmd.argument());
+ else {
+ InsetGraphics::string2params(grp, bv->buffer(), tmp);
+ tmp.filename = inspar.filename;
+ inspar = tmp;
+ }
+
+ ins->setParams(inspar);
+ }
+
case LFUN_SPACE_INSERT:
if (cur.paragraph().layout().free_spacing)
insertChar(cur, ' ');
case LFUN_ACCENT_UNDERDOT:
case LFUN_ACCENT_UNDERBAR:
case LFUN_ACCENT_CARON:
- case LFUN_ACCENT_SPECIAL_CARON:
case LFUN_ACCENT_BREVE:
case LFUN_ACCENT_TIE:
case LFUN_ACCENT_HUNGARIAN_UMLAUT:
case LFUN_ACCENT_UNDERDOT:
case LFUN_ACCENT_UNDERBAR:
case LFUN_ACCENT_CARON:
- case LFUN_ACCENT_SPECIAL_CARON:
case LFUN_ACCENT_BREVE:
case LFUN_ACCENT_TIE:
case LFUN_ACCENT_HUNGARIAN_UMLAUT: