2459 return |
2459 return |
2460 |
2460 |
2461 dlg = PropertiesDialog(self, True) |
2461 dlg = PropertiesDialog(self, True) |
2462 if dlg.exec() == QDialog.DialogCode.Accepted: |
2462 if dlg.exec() == QDialog.DialogCode.Accepted: |
2463 self.closeProject() |
2463 self.closeProject() |
|
2464 |
|
2465 # reset the auto save flag |
|
2466 autoSaveProject = Preferences.getProject("AutoSaveProject") |
|
2467 Preferences.setProject("AutoSaveProject", False) |
|
2468 |
2464 dlg.storeData() |
2469 dlg.storeData() |
2465 self.__pdata["VCS"] = "None" |
2470 self.__pdata["VCS"] = "None" |
2466 self.opened = True |
2471 self.opened = True |
2467 if not self.__pdata["FILETYPES"]: |
2472 if not self.__pdata["FILETYPES"]: |
2468 self.initFileTypes() |
2473 self.initFileTypes() |
2520 "<p>The project directory <b>{0}</b> could not" |
2525 "<p>The project directory <b>{0}</b> could not" |
2521 " be created.</p>" |
2526 " be created.</p>" |
2522 ).format(self.ppath), |
2527 ).format(self.ppath), |
2523 ) |
2528 ) |
2524 self.vcs = self.initVCS() |
2529 self.vcs = self.initVCS() |
|
2530 # set the auto save flag to its supposed value |
|
2531 Preferences.setProject("AutoSaveProject", autoSaveProject) |
2525 return |
2532 return |
2526 |
2533 |
2527 # create an empty __init__.py file to make it a Python package |
2534 # create an empty __init__.py file to make it a Python package |
2528 # (only for Python and Python3) |
2535 # (only for Python and Python3) |
2529 if self.__pdata["PROGLANGUAGE"] in ["Python3", "MicroPython"]: |
2536 if self.__pdata["PROGLANGUAGE"] in ["Python3", "MicroPython"]: |
2581 self.tr( |
2588 self.tr( |
2582 "<p>The project directory <b>{0}</b> is not" |
2589 "<p>The project directory <b>{0}</b> is not" |
2583 " writable.</p>" |
2590 " writable.</p>" |
2584 ).format(self.ppath), |
2591 ).format(self.ppath), |
2585 ) |
2592 ) |
|
2593 # set the auto save flag to its supposed value |
|
2594 Preferences.setProject("AutoSaveProject", autoSaveProject) |
2586 return |
2595 return |
2587 |
2596 |
2588 if self.__pdata["MAINSCRIPT"]: |
2597 if self.__pdata["MAINSCRIPT"]: |
2589 if not os.path.isabs(self.__pdata["MAINSCRIPT"]): |
2598 if not os.path.isabs(self.__pdata["MAINSCRIPT"]): |
2590 ms = os.path.join(self.ppath, self.__pdata["MAINSCRIPT"]) |
2599 ms = os.path.join(self.ppath, self.__pdata["MAINSCRIPT"]) |
2784 self.newProject.emit() |
2793 self.newProject.emit() |
2785 |
2794 |
2786 else: |
2795 else: |
2787 self.newProjectHooks.emit() |
2796 self.newProjectHooks.emit() |
2788 self.newProject.emit() |
2797 self.newProject.emit() |
|
2798 |
|
2799 # set the auto save flag to its supposed value |
|
2800 Preferences.setProject("AutoSaveProject", autoSaveProject) |
2789 |
2801 |
2790 if self.__pdata["EMBEDDED_VENV"]: |
2802 if self.__pdata["EMBEDDED_VENV"]: |
2791 self.__createEmbeddedEnvironment() |
2803 self.__createEmbeddedEnvironment() |
2792 self.menuEnvironmentAct.setEnabled(self.__pdata["EMBEDDED_VENV"]) |
2804 self.menuEnvironmentAct.setEnabled(self.__pdata["EMBEDDED_VENV"]) |
2793 |
2805 |