#include "LyXRC.h"
#include "MetricsInfo.h"
#include "Paragraph.h"
-#include "paragraph_funcs.h"
#include "ParagraphParameters.h"
#include "ParIterator.h"
#include "Session.h"
break;
case LFUN_DIALOG_SHOW_NEW_INSET:
+ // FIXME: this is wrong, but I do not understand the
+ // intent (JMarc)
if (cur.inset().lyxCode() == CAPTION_CODE)
return cur.inset().getStatus(cur, cmd, flag);
- flag.setEnabled(cur.inset().lyxCode() != ERT_CODE &&
- cur.inset().lyxCode() != LISTINGS_CODE);
+ // FIXME we should consider passthru paragraphs too.
+ flag.setEnabled(!cur.inset().getLayout().isPassThru());
break;
default:
cap::replaceSelection(cur);
buffer_.undo().recordUndo(cur);
if (asParagraph)
- cur.innerText()->insertStringAsParagraphs(cur, tmpstr);
+ cur.innerText()->insertStringAsParagraphs(cur, tmpstr, cur.current_font);
else
- cur.innerText()->insertStringAsLines(cur, tmpstr);
+ cur.innerText()->insertStringAsLines(cur, tmpstr, cur.current_font);
updateMetrics();
buffer_.changed();