mirror of
https://gitee.com/vnotex/vnote.git
synced 2025-07-05 22:09:52 +08:00
bug-fix: skip system file when saving opened files before close
This commit is contained in:
parent
30dfc24a28
commit
a5e7fc18ab
@ -2060,6 +2060,13 @@ void VMainWindow::closeEvent(QCloseEvent *event)
|
|||||||
fileInfos.reserve(tabs.size());
|
fileInfos.reserve(tabs.size());
|
||||||
|
|
||||||
for (auto const & tab : tabs) {
|
for (auto const & tab : tabs) {
|
||||||
|
// Skip system file.
|
||||||
|
VFile *file = tab.m_editTab->getFile();
|
||||||
|
if (file->getType() == FileType::Orphan
|
||||||
|
&& dynamic_cast<VOrphanFile *>(file)->isSystemFile()) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
VFileSessionInfo info = VFileSessionInfo::fromEditTabInfo(&tab);
|
VFileSessionInfo info = VFileSessionInfo::fromEditTabInfo(&tab);
|
||||||
fileInfos.push_back(info);
|
fileInfos.push_back(info);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user