mirror of
https://gitee.com/vnotex/vnote.git
synced 2025-07-05 05:49:53 +08:00
NotebookExplorer: use root node if it is recycle bin node on new file
This commit is contained in:
parent
52de2eee6c
commit
aced51baff
@ -1,6 +1,8 @@
|
||||
# vnote
|
||||
A pleasant note-taking platform.
|
||||
|
||||
 
|
||||
|
||||
> At early 2019, I decided to refactor VNote as VNoteX. Now a fresh VNote is ready!
|
||||
> VNoteX is closed source and is intended to keep several premium features compared to VNote. Most of VNoteX's code base will be open source as VNote 3.0, so VNote will share most of the code base with VNoteX and continue to be open source from 3.0.
|
||||
> **Welcome to VNoteX and VNote 3.0!**
|
||||
@ -14,8 +16,6 @@ The obsolete code base of VNote 2.0 is available at the [vnote2.0](https://githu
|
||||
|
||||
For more information, please visit [**VNote's Homepage**](https://vnotex.github.io/vnote).
|
||||
|
||||
 
|
||||
|
||||

|
||||
|
||||
## Description
|
||||
|
@ -200,8 +200,9 @@ void NotebookExplorer::newFolder()
|
||||
return;
|
||||
}
|
||||
|
||||
if (m_currentNotebook->isRecycleBinNode(node)
|
||||
|| m_currentNotebook->isNodeInRecycleBin(node)) {
|
||||
if (m_currentNotebook->isRecycleBinNode(node)) {
|
||||
node = m_currentNotebook->getRootNode().data();
|
||||
} else if (m_currentNotebook->isNodeInRecycleBin(node)) {
|
||||
MessageBoxHelper::notify(MessageBoxHelper::Information,
|
||||
tr("Could not create folder within Recycle Bin."),
|
||||
VNoteX::getInst().getMainWindow());
|
||||
@ -221,8 +222,9 @@ void NotebookExplorer::newNote()
|
||||
return;
|
||||
}
|
||||
|
||||
if (m_currentNotebook->isRecycleBinNode(node)
|
||||
|| m_currentNotebook->isNodeInRecycleBin(node)) {
|
||||
if (m_currentNotebook->isRecycleBinNode(node)) {
|
||||
node = m_currentNotebook->getRootNode().data();
|
||||
} else if (m_currentNotebook->isNodeInRecycleBin(node)) {
|
||||
MessageBoxHelper::notify(MessageBoxHelper::Information,
|
||||
tr("Could not create note within Recycle Bin."),
|
||||
VNoteX::getInst().getMainWindow());
|
||||
@ -285,8 +287,9 @@ void NotebookExplorer::importFile()
|
||||
return;
|
||||
}
|
||||
|
||||
if (m_currentNotebook->isRecycleBinNode(node)
|
||||
|| m_currentNotebook->isNodeInRecycleBin(node)) {
|
||||
if (m_currentNotebook->isRecycleBinNode(node)) {
|
||||
node = m_currentNotebook->getRootNode().data();
|
||||
} else if (m_currentNotebook->isNodeInRecycleBin(node)) {
|
||||
MessageBoxHelper::notify(MessageBoxHelper::Information,
|
||||
tr("Could not create file within Recycle Bin."),
|
||||
VNoteX::getInst().getMainWindow());
|
||||
@ -325,8 +328,9 @@ void NotebookExplorer::importFolder()
|
||||
return;
|
||||
}
|
||||
|
||||
if (m_currentNotebook->isRecycleBinNode(node)
|
||||
|| m_currentNotebook->isNodeInRecycleBin(node)) {
|
||||
if (m_currentNotebook->isRecycleBinNode(node)) {
|
||||
node = m_currentNotebook->getRootNode().data();
|
||||
} else if (m_currentNotebook->isNodeInRecycleBin(node)) {
|
||||
MessageBoxHelper::notify(MessageBoxHelper::Information,
|
||||
tr("Could not create folder within Recycle Bin."),
|
||||
VNoteX::getInst().getMainWindow());
|
||||
|
Loading…
x
Reference in New Issue
Block a user