[rhel7/master/f21] custom: Clearing errors should also clear Done clicked state (#1158609)
Brian C. Lane
bcl at redhat.com
Thu Oct 30 18:05:43 UTC 2014
When there is an error we tell the user to click done again to exit. If
they do anything else the state needs to be cleared. We already call
clear_errors from all these places in order to reset the error bar, so
add clearing of the done clicked state.
Since do_check also clears errors, set the state to True *after* an
error has been found.
Resolves: rhbz#1158609
---
pyanaconda/ui/gui/spokes/custom.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/pyanaconda/ui/gui/spokes/custom.py b/pyanaconda/ui/gui/spokes/custom.py
index 9daf9d1..a260fc2 100644
--- a/pyanaconda/ui/gui/spokes/custom.py
+++ b/pyanaconda/ui/gui/spokes/custom.py
@@ -2188,7 +2188,6 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker):
# If back has been clicked on once already and no other changes made on the screen,
# run the storage check now. This handles displaying any errors in the info bar.
if not self._back_already_clicked:
- self._back_already_clicked = True
new_luks = [d for d in self.__storage.devices
if d.format.type == "luks" and not d.format.exists]
@@ -2208,6 +2207,7 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker):
luks.format.passphrase = self.passphrase
if not self._do_check():
+ self._back_already_clicked = True
return
if len(self.__storage.devicetree.findActions()) > 0:
@@ -3109,6 +3109,7 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker):
def clear_errors(self):
self._error = None
self.clear_info()
+ self._back_already_clicked = False
# This callback is for the button that just resets the UI to anaconda's
# current understanding of the disk layout.
--
1.9.3
More information about the anaconda-patches
mailing list