From 877f395a26ac1499a9e9354fd96e7b0648ae831e Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Thu, 28 May 2015 14:38:40 -0400 Subject: fix list jumping when tickling an item (mga#12180) --- NEWS | 3 +++ Rpmdrake/edit_urpm_sources.pm | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/NEWS b/NEWS index aac59da1..35a8b423 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,6 @@ +- edit-urpm-sources: + o fix list jumping when tickling an item (mga#12180) + Version 6.19 - 18 May 2015, Thierry Vignaud - update GUI package list diff --git a/Rpmdrake/edit_urpm_sources.pm b/Rpmdrake/edit_urpm_sources.pm index 0acfdfb7..fcad2c91 100644 --- a/Rpmdrake/edit_urpm_sources.pm +++ b/Rpmdrake/edit_urpm_sources.pm @@ -1130,6 +1130,10 @@ sub mainwindow() { my ($name) = @_; $reorder_ok = 0; $something_changed = 1; + # save position: + my $rect = $list_tv->get_visible_rect; + my ($x, $y) = @$rect{'x', 'y'}; + if (defined $name) { urpm::media::select_media($urpm, $name); update_sources_check( @@ -1153,6 +1157,8 @@ sub mainwindow() { ); } $reorder_ok = 1; + # restore position: + Glib::Timeout->add(10, sub { $list_tv->scroll_to_point($x, $y); 0 }); }; $reread_media->(); $something_changed = 0; -- cgit v1.2.1