mirror of
https://gitee.com/vnotex/vnote.git
synced 2025-07-06 06:19:52 +08:00
move cursor to end when create new note with title (#1408)
* disable qtquickcompiler * move cursor to end when create new note with title
This commit is contained in:
parent
8f62f9902d
commit
8a549ea323
@ -14,6 +14,8 @@ DEFINES += QT_MESSAGELOGCONTEXT
|
||||
TARGET = VNote
|
||||
TEMPLATE = app
|
||||
|
||||
CONFIG -= qtquickcompiler
|
||||
|
||||
RC_ICONS = resources/icons/vnote.ico
|
||||
ICON = resources/icons/vnote.icns
|
||||
|
||||
@ -317,8 +319,6 @@ RESOURCES += \
|
||||
vnote.qrc \
|
||||
translations.qrc
|
||||
|
||||
QTQUICK_COMPILER_SKIPPED_RESOURCES += vnote.qrc
|
||||
|
||||
macx {
|
||||
LIBS += -L/usr/local/lib
|
||||
INCLUDEPATH += /usr/local/include
|
||||
|
@ -431,8 +431,10 @@ void VFileList::newFile()
|
||||
|
||||
// Move cursor down if content has been inserted.
|
||||
if (moveCursorEnd) {
|
||||
const VMdTab *tab = dynamic_cast<VMdTab *>(editArea->getCurrentTab());
|
||||
VMdTab *tab = dynamic_cast<VMdTab *>(editArea->getCurrentTab());
|
||||
if (tab) {
|
||||
// It will init markdown editor (within 50 ms)
|
||||
// See VMdTab::VMdTab --> QTimer::singleShot(50, ...
|
||||
VMdEditor *edit = tab->getEditor();
|
||||
if (edit && edit->getFile() == file) {
|
||||
QTextCursor cursor = edit->textCursor();
|
||||
|
@ -72,6 +72,9 @@ public:
|
||||
|
||||
VWebView *getWebViewer() const;
|
||||
|
||||
// Get the markdown editor. If not init yet, init and return it.
|
||||
VMdEditor *getEditor();
|
||||
|
||||
VMdEditor *getEditor() const;
|
||||
|
||||
MarkdownConverterType getMarkdownConverterType() const;
|
||||
@ -226,9 +229,6 @@ private:
|
||||
// Focus the proper child widget.
|
||||
void focusChild() Q_DECL_OVERRIDE;
|
||||
|
||||
// Get the markdown editor. If not init yet, init and return it.
|
||||
VMdEditor *getEditor();
|
||||
|
||||
// Restore from @p_fino.
|
||||
// Return true if succeed.
|
||||
bool restoreFromTabInfo(const VEditTabInfo &p_info) Q_DECL_OVERRIDE;
|
||||
|
Loading…
x
Reference in New Issue
Block a user