Skip to content

Commit

Permalink
Merge 5279270 into fd0b4d4
Browse files Browse the repository at this point in the history
  • Loading branch information
dgdavid committed Nov 6, 2019
2 parents fd0b4d4 + 5279270 commit b3a1626
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 2 deletions.
7 changes: 7 additions & 0 deletions package/yast2-installation.changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
-------------------------------------------------------------------
Wed Nov 6 19:54:47 UTC 2019 - David Diaz <dgonzalez@suse.com>

- Save and restore the proposal vertical scroll (related to the
problem reseting the scroll position reported in bsc#1143558)
- 4.2.20

-------------------------------------------------------------------
Fri Oct 25 11:44:58 UTC 2019 - Josef Reidinger <jreidinger@suse.com>

Expand Down
5 changes: 4 additions & 1 deletion package/yast2-installation.spec
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#

Name: yast2-installation
Version: 4.2.19
Version: 4.2.20
Release: 0
Group: System/YaST
License: GPL-2.0-only
Expand Down Expand Up @@ -94,6 +94,9 @@ Requires: iproute2
%endif


# RichText VScrollValue prop is needed to restore
# the vertical scroll of proposal summary after re-render it
Conflicts: libyui < 3.7.0
# Pkg::SourceProvideSignedFile Pkg::SourceProvideDigestedFile
# pkg-bindings are not directly required
Conflicts: yast2-pkg-bindings < 2.17.25
Expand Down
13 changes: 12 additions & 1 deletion src/lib/installation/proposal_runner.rb
Original file line number Diff line number Diff line change
Expand Up @@ -199,16 +199,19 @@ def confirm_update
def input_loop
loop do
richtext_normal_cursor(Id(:proposal))

# bnc #431567
# Some proposal module can change it while called
assign_next_button

restore_vertical_scroll
input = Yast::UI.UserInput

log.info "Proposal - UserInput: '#{input}'"
return :next if input == :accept
return :abort if input == :cancel

log.info "Proposal - UserInput: '#{input}'"
save_vertical_scroll
richtext_busy_cursor(Id(:proposal))

case input
Expand Down Expand Up @@ -261,6 +264,14 @@ def input_loop
nil
end

def save_vertical_scroll
@proposal_vscroll = Yast::UI.QueryWidget(Id(:proposal), :VScrollValue)
end

def restore_vertical_scroll
Yast::UI.ChangeWidget(Id(:proposal), :VScrollValue, @proposal_vscroll)
end

def switch_to_tab(input)
@current_tab = input
load_matching_submodules_list
Expand Down

0 comments on commit b3a1626

Please sign in to comment.