#include "BufferParams.h"
#include "Changes.h"
-#include "support/debug.h"
#include "InsetList.h"
#include "Layout.h"
#include "Paragraph.h"
#include "Text.h"
#include "TextClass.h"
+#include "support/debug.h"
+
#include <boost/next_prior.hpp>
+using namespace std;
namespace lyx {
-using std::endl;
-
-
static bool moveItem(Paragraph & fromPar, pos_type fromPos,
Paragraph & toPar, pos_type toPos, BufferParams const & params)
{
Paragraph & par = pars[par_offset];
- // without doing that we get a crash when typing <Return> at the
- // end of a paragraph
- tmp->layout(bparams.getTextClass().defaultLayout());
// remember to set the inset_owner
tmp->setInsetOwner(par.inInset());
+ // without doing that we get a crash when typing <Return> at the
+ // end of a paragraph
+ if (par.useEmptyLayout())
+ tmp->layout(bparams.getTextClass().emptyLayout());
+ else
+ tmp->layout(bparams.getTextClass().defaultLayout());
// layout stays the same with latex-environments
if (keep_layout) {