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 1065310
Showing 1 changed file with 12 additions and 1 deletion.
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 1065310

Please sign in to comment.