mirror of
https://gitee.com/vnotex/vnote.git
synced 2025-07-05 13:59:52 +08:00
bug-fix: move to the end of document after inserting title when creating a new note
This commit is contained in:
parent
07e8f27776
commit
ed4044061f
@ -321,9 +321,9 @@ void VFileList::newFile()
|
||||
QWidget *wid = QApplication::focusWidget();
|
||||
VMdEdit *edit = dynamic_cast<VMdEdit *>(wid);
|
||||
if (edit && edit->getFile() == file) {
|
||||
QKeyEvent *downEvent = new QKeyEvent(QEvent::KeyPress, Qt::Key_Down,
|
||||
Qt::NoModifier);
|
||||
QCoreApplication::postEvent(edit, downEvent);
|
||||
QTextCursor cursor = edit->textCursor();
|
||||
cursor.movePosition(QTextCursor::End);
|
||||
edit->setTextCursor(cursor);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user