Clean up.
[bertos.git] / wizard / bertos.py
index c53674a9f7574baee2397b893732d35b9e357fef..38b7224c0691c02181460a2b645a12609830f1ab 100755 (executable)
@@ -49,13 +49,12 @@ from BWizard import BWizard
 from BIntroPage import BIntroPage
 from BFolderPage import BFolderPage
 from BBoardPage import BBoardPage
 from BIntroPage import BIntroPage
 from BFolderPage import BFolderPage
 from BBoardPage import BBoardPage
-from BRoutePage import BRoutePage
+from BProjectPresets import BProjectPresets
 from BOpenPage import BOpenPage
 from BVersionPage import BVersionPage
 from BCpuPage import BCpuPage
 from BToolchainPage import BToolchainPage
 from BModulePage import BModulePage
 from BOpenPage import BOpenPage
 from BVersionPage import BVersionPage
 from BCpuPage import BCpuPage
 from BToolchainPage import BToolchainPage
 from BModulePage import BModulePage
-from BOutputPage import BOutputPage
 from BCreationPage import BCreationPage
 from BFinalPage import BFinalPage
 
 from BCreationPage import BCreationPage
 from BFinalPage import BFinalPage
 
@@ -67,7 +66,7 @@ from LoadException import VersionException, ToolchainException
 
 def newProject():
     QApplication.instance().project = BProject()
 
 def newProject():
     QApplication.instance().project = BProject()
-    page_list = [BIntroPage, BFolderPage, BVersionPage, BBoardPage, BRoutePage, BCpuPage, BToolchainPage, BModulePage, BOutputPage, BCreationPage, BFinalPage]
+    page_list = [BIntroPage, BFolderPage, BVersionPage, BBoardPage, BProjectPresets, BCpuPage, BToolchainPage, BModulePage, BCreationPage, BFinalPage]
     wizard = BWizard(page_list)
     wizard.show()
     wizard.exec_()
     wizard = BWizard(page_list)
     wizard.show()
     wizard.exec_()
@@ -85,13 +84,15 @@ def newProject():
 def editProject(project_file):
     info_dict = {}
     while(True):
 def editProject(project_file):
     info_dict = {}
     while(True):
+        # Empty project is the default fallback.
+        QApplication.instance().project = BProject()
         try:
             QApplication.instance().project = BProject(project_file, info_dict)
         except VersionException:
             QMessageBox.critical(
                 None,
                 QObject().tr("BeRTOS version not found!"),
         try:
             QApplication.instance().project = BProject(project_file, info_dict)
         except VersionException:
             QMessageBox.critical(
                 None,
                 QObject().tr("BeRTOS version not found!"),
-                QObject().tr("The selected BeRTOS version is not found, please select an existing one...")
+                QObject().tr("The selected BeRTOS version was not found, please select another one...")
             )
             dialog = BVersionDialog()
             if dialog.exec_():
             )
             dialog = BVersionDialog()
             if dialog.exec_():
@@ -102,7 +103,7 @@ def editProject(project_file):
             QMessageBox.critical(
                 None,
                 QObject().tr("Toolchain not found!"),
             QMessageBox.critical(
                 None,
                 QObject().tr("Toolchain not found!"),
-                QObject().tr("The selected toolchain is not found, please select an existing one...")
+                QObject().tr("The selected toolchain was not found, please select another one...")
             )
             QApplication.instance().project = exc.partial_project
             dialog = BToolchainDialog()
             )
             QApplication.instance().project = exc.partial_project
             dialog = BToolchainDialog()