-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
QuickAccess: add quick note #2373
Conversation
src/widgets/viewsplit.h
Outdated
@@ -92,6 +92,8 @@ namespace vnotex | |||
|
|||
void distributeSplitsRequested(); | |||
|
|||
void newNoteRequested(ViewSplit *p_split, const QVector<int> &p_type, const QString &p_path); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this function necessary? Can we just emit the final signal here instead of via the ViewArea?
src/widgets/notebookexplorer.cpp
Outdated
auto node = checkNotebookAndGetCurrentExploredFolderNode(); | ||
if (!node) { | ||
return; | ||
if (p_type.length() <= c_defaultCreateNote) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
c_defaultCreateNode is 0. So what does this logic mean?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is mainly used to determine p_type, Is it the default, is it single, is it multiple.
src/widgets/notebookexplorer.cpp
Outdated
paras->m_newFile = true; | ||
emit VNoteX::getInst().openNodeRequested(dialog.getNewNode().data(), paras); | ||
} | ||
} else if (p_type.length() == c_singleQuickNote) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just use 1 is fine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Want to use < 1
,= 1
, but that's a magic constant, which is hard to understand
Impl: #2351
In this modification, the function of double-click tab to quickly create notes is added. do not adjust the template for now.