فهرست منبع

Fixed 'remove file' command not removing editor

Ethan M 12 سال پیش
والد
کامیت
60fd0cd940
1فایلهای تغییر یافته به همراه4 افزوده شده و 0 حذف شده
  1. 4 0
      IDE/Contents/Source/PolycodeIDEApp.cpp

+ 4 - 0
IDE/Contents/Source/PolycodeIDEApp.cpp

@@ -201,6 +201,10 @@ void PolycodeIDEApp::doRemoveFile() {
 		if(projectManager->getActiveProject()) {
 			frame->projectBrowser->refreshProject(projectManager->getActiveProject());
 		}
+		// have to set changes to false to avoid problems with saving and modal dialogs in removeEditor()
+		// besides, we're removing the file, so saving is not necessary
+		editorManager->getCurrentEditor()->setHasChanges(false);
+		closeFile(); //remove editor and remove from file selector combobox
 	}
 }