478 const QString newText = modelElementToString(action.newElement); |
478 const QString newText = modelElementToString(action.newElement); |
479 // Make sure we have an empty line |
479 // Make sure we have an empty line |
480 if (not model->lastBlock().text().isEmpty()) { |
480 if (not model->lastBlock().text().isEmpty()) { |
481 cursor.insertBlock(); |
481 cursor.insertBlock(); |
482 } |
482 } |
483 qDebug() << cursor.blockNumber(); |
|
484 cursor.insertText(newText); |
483 cursor.insertText(newText); |
485 }, |
484 }, |
486 [](const DeleteFromModel&){}, |
485 [](const DeleteFromModel&){}, |
487 [model](const ModifyModel& action){ |
486 [model](const ModifyModel& action){ |
488 QTextBlock block = model->findBlockByLineNumber((int) action.position); |
487 QTextBlock block = model->findBlockByLineNumber((int) action.position); |