Pārlūkot izejas kodu

Clear project title at the top of the IDE if no projects are open.

Ethan M 12 gadi atpakaļ
vecāks
revīzija
40a52bc301

+ 2 - 0
IDE/Contents/Source/PolycodeFrame.cpp

@@ -788,6 +788,8 @@ void PolycodeFrame::handleEvent(Event *event) {
 	if(event->getDispatcher() == projectManager) {
         if(projectManager->getActiveProject()) {
             currentProjectTitle->setText(projectManager->getActiveProject()->getProjectName());
+        } else {
+        	if (projectManager->getProjectCount() == 0) { currentProjectTitle->setText(""); }
         }
 	}
 	

+ 1 - 1
IDE/Contents/Source/PolycodeProjectManager.cpp

@@ -78,7 +78,7 @@ int PolycodeProjectManager::removeProject(PolycodeProject *project) {
 	}	
 	
 	if(activeProject == project) {
-		activeProject = NULL;
+		this->setActiveProject(NULL);
 	}
 	
 	delete project;