aboutsummaryrefslogtreecommitdiffstats
path: root/Rpmdrake
diff options
context:
space:
mode:
authorThierry Vignaud <thierry.vignaud@gmail.com>2015-05-28 14:38:40 -0400
committerThierry Vignaud <thierry.vignaud@gmail.com>2015-06-01 18:19:35 +0200
commit877f395a26ac1499a9e9354fd96e7b0648ae831e (patch)
tree6204914c9fc67568c51149544d464f952c544262 /Rpmdrake
parent0d81bc1f0036de1538f7643cd7bf33a5c129fa6f (diff)
downloadrpmdrake-877f395a26ac1499a9e9354fd96e7b0648ae831e.tar
rpmdrake-877f395a26ac1499a9e9354fd96e7b0648ae831e.tar.gz
rpmdrake-877f395a26ac1499a9e9354fd96e7b0648ae831e.tar.bz2
rpmdrake-877f395a26ac1499a9e9354fd96e7b0648ae831e.tar.xz
rpmdrake-877f395a26ac1499a9e9354fd96e7b0648ae831e.zip
fix list jumping when tickling an item (mga#12180)
Diffstat (limited to 'Rpmdrake')
-rw-r--r--Rpmdrake/edit_urpm_sources.pm6
1 files changed, 6 insertions, 0 deletions
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;