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 05f8150
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 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 @@ -256,11 +260,20 @@ def input_loop
Yast::Wizard.SetNextButton(:next, Yast::Label.NextButton) if Yast::Stage.initial
return :back
end

end # while 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 05f8150

Please sign in to comment.