Skip to content

Commit

Permalink
Prevent any changes in the StorageSpoke if just going back
Browse files Browse the repository at this point in the history
If user deselects all disks it means they just want to go back from the disk
selection screen. If that's the case, we shouldn't do any changes to storage
configuration.

Conflicts:
	pyanaconda/ui/gui/spokes/storage.py

(cherry-picked from commit 0c9a8bc)
  • Loading branch information
vpodzime committed Jul 29, 2015
1 parent a1bb1ac commit 28d12b8
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions pyanaconda/ui/gui/spokes/storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -858,6 +858,12 @@ def on_back_clicked(self, button):
NormalSpoke.on_back_clicked(self, button)
return

disks = [d for d in self.disks if d.name in self.selected_disks]
# No disks selected? The user wants to back out of the storage spoke.
if not disks:
NormalSpoke.on_back_clicked(self, button)
return

# Remove all non-existing devices if autopart was active when we last
# refreshed.
if self._previous_autopart:
Expand All @@ -867,12 +873,6 @@ def on_back_clicked(self, button):
# hide/unhide disks as requested
self._hide_unhide_disks()

disks = [d for d in self.disks if d.name in self.selected_disks]
# No disks selected? The user wants to back out of the storage spoke.
if not disks:
NormalSpoke.on_back_clicked(self, button)
return

# make sure no containers were split up by the user's disk selection
self.clear_info()
self.errors = checkDiskSelection(self.storage, self.selected_disks)
Expand Down

0 comments on commit 28d12b8

Please sign in to comment.