diff --git a/package/autoyast2.changes b/package/autoyast2.changes index 21870f8a6..5958660f7 100644 --- a/package/autoyast2.changes +++ b/package/autoyast2.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Jan 30 15:14:25 CET 2019 - schubi@suse.de + +- Fixed conflicting items in rule dialogs (bsc1123091). +- 4.0.67 + ------------------------------------------------------------------- Tue Nov 13 11:53:55 CET 2018 - schubi@suse.de diff --git a/package/autoyast2.spec b/package/autoyast2.spec index 3001787de..1e15dea8d 100644 --- a/package/autoyast2.spec +++ b/package/autoyast2.spec @@ -22,7 +22,7 @@ %endif Name: autoyast2 -Version: 4.0.66 +Version: 4.0.67 Release: 0 BuildRoot: %{_tmppath}/%{name}-%{version}-build diff --git a/src/modules/AutoInstallRules.rb b/src/modules/AutoInstallRules.rb index 7991a952d..202ae4de2 100644 --- a/src/modules/AutoInstallRules.rb +++ b/src/modules/AutoInstallRules.rb @@ -680,11 +680,7 @@ def Read element_nr = Ops.add(element_nr, 1) if Builtins.contains(@tomerge, file) Builtins.foreach(Ops.get_list(rule, ["dialog", "conflicts"], [])) do |c| - Ops.set( - conflictsCounter, - c, - Ops.add(Ops.get(conflictsCounter, c, 0), 1) - ) + conflictsCounter[c] = 0 end end end @@ -733,18 +729,14 @@ def Read ) ) UI.ChangeWidget(Id(:back), :Enabled, false) if dialogIndex == 0 - Builtins.foreach(conflictsCounter) do |c, n| - UI.ChangeWidget( - Id(c), - :Enabled, - Ops.greater_than(n, 0) ? false : true - ) - UI.ChangeWidget( - Id(c), - :Value, - Ops.greater_than(n, 0) ? false : true - ) + + # If there are conflicting items set them all to enabled/not_selected + # in order to let the user decide at first. + conflictsCounter.each do |c, n| + UI.ChangeWidget(Id(c), :Enabled, true) + UI.ChangeWidget(Id(c), :Value, false) end + while true ret = nil if timeout == 0