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