Skip to content

Commit

Permalink
Save and restore properly the proposal vertical scroll
Browse files Browse the repository at this point in the history
  • Loading branch information
dgdavid committed Nov 6, 2019
1 parent fd0b4d4 commit 1c733b2
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/lib/installation/proposal_runner.rb
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,9 @@ def confirm_update

def input_loop
loop do
restore_vertical_scroll
richtext_normal_cursor(Id(:proposal))

# bnc #431567
# Some proposal module can change it while called
assign_next_button
Expand All @@ -209,6 +211,8 @@ def input_loop
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 +265,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 1c733b2

Please sign in to comment.