Show hourglass when doing something potentially long
authorduplo <duplo@38d2e660-2303-0410-9eaa-f027e97ec537>
Thu, 10 Sep 2009 09:27:35 +0000 (09:27 +0000)
committerduplo <duplo@38d2e660-2303-0410-9eaa-f027e97ec537>
Thu, 10 Sep 2009 09:27:35 +0000 (09:27 +0000)
git-svn-id: https://src.develer.com/svnoss/bertos/trunk@2918 38d2e660-2303-0410-9eaa-f027e97ec537

wizard/BEditingDialog.py

index 1d454f4ead1bb0c2f7c307c642294f957ee09cf4..e0d2785321179432433fb409d3d91275fe5eaab4 100644 (file)
@@ -166,6 +166,7 @@ class BEditingDialog(QDialog):
                     self.tr("Changing the BeRTOS version will destroy all the modification done on the BeRTOS sources"),
                     QMessageBox.Ok | QMessageBox.Cancel
                 ) == QMessageBox.Ok:
+                   qApp.setOverrideCursor(QCursor(Qt.WaitCursor))
                     version_page.setProjectInfo("SOURCES_PATH", version)
                     version_page.setProjectInfo("OLD_SOURCES_PATH", current_version)
                     enabled_modules = bertos_utils.enabledModules(version_page.project())
@@ -183,12 +184,15 @@ class BEditingDialog(QDialog):
                     version_page.setProjectInfo("CONFIGURATIONS", merged_configuration)
                     bertos_utils.setEnabledModules(version_page.project(), enabled_modules)
                     self.module_page.fillModuleTree()
+                    qApp.restoreOverrideCursor()
                else:
                    # Rollback version to the previous selected one.
                    version_page.setProjectInfo("SOURCES_PATH", current_version)
 
     def apply(self):
+        qApp.setOverrideCursor(QCursor(Qt.WaitCursor))
         createBertosProject(self.module_page.project(), edit=True)
+        qApp.restoreOverrideCursor()
         self.accept()
 
     def toolchains(self):