打开文件的bug。

This commit is contained in:
unlockable
2023-06-24 19:15:06 +08:00
parent 1c58758515
commit 39b3cec221
5 changed files with 16 additions and 13 deletions

View File

@@ -262,12 +262,13 @@ void StudentInfoManager::closeFile() {
}
this->hasChangePendingSave = false;
Iterator<BaseRecord *> iter = this->recordPtrList.iterate();
while (iter) {
delete iter.next();
}
this->recordPtrList.clear();
}
Iterator<BaseRecord *> iter = this->recordPtrList.iterate();
while (iter) {
delete iter.next();
}
this->recordPtrList.clear();
this->displayer.reapplyFilter();
}
bool StudentInfoManager::cmdNew() {
@@ -353,7 +354,7 @@ bool StudentInfoManager::cmdNew() {
tm curDate;
#ifdef __APPLE__
#if defined __APPLE__ || defined __linux__
curDate = *(localtime(&curTime));
#endif
@@ -934,6 +935,8 @@ void StudentInfoManager::mainloop() {
else if (cmd == infoManagerCommand::home::closeFile) {
this->closeFile();
this->promptForFileName();
this->readFile();
this->displayer.reapplyFilter();
}
else if (cmd == infoManagerCommand::home::quit) {
this->closeFile();