打开文件的bug。
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user