src/main.cpp

changeset 337
5bb26aa33ad5
parent 336
e07425ac5834
child 338
719b909a7d2b
equal deleted inserted replaced
336:e07425ac5834 337:5bb26aa33ad5
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);

mercurial