From 9e28c871a10dc664ff431635695c4c9c5d144304 Mon Sep 17 00:00:00 2001
From: Paolo Capriotti
Date: Fri, 26 Jun 2009 08:59:58 +0200
Subject: [PATCH] Keep move list selection synchronized.
---
lib/mainwindow.rb | 2 +-
lib/plugins/movelist/simple_movelist.rb | 14 +++-----------
2 files changed, 4 insertions(+), 12 deletions(-)
diff --git a/lib/mainwindow.rb b/lib/mainwindow.rb
index d9129b0..25803dd 100644
--- a/lib/mainwindow.rb
+++ b/lib/mainwindow.rb
@@ -77,7 +77,7 @@ private
movelist = @loader.get_matching(%w(movelist)).new(@controller)
movelist_dock = Qt::DockWidget.new(self)
movelist_dock.widget = movelist
- movelist_dock.window_title = KDE.i18n("Move list")
+ movelist_dock.window_title = KDE.i18n("History")
movelist_dock.object_name = "movelist"
add_dock_widget(Qt::LeftDockWidgetArea, movelist_dock, Qt::Vertical)
movelist_dock.show
diff --git a/lib/plugins/movelist/simple_movelist.rb b/lib/plugins/movelist/simple_movelist.rb
index 0ff3e6a..c350abd 100644
--- a/lib/plugins/movelist/simple_movelist.rb
+++ b/lib/plugins/movelist/simple_movelist.rb
@@ -31,18 +31,10 @@ class SimpleMoveList < Qt::ListView
remove_rows(@history.size, rowCount - @history.size)
end
update_row(@history.current)
- fire_changed
+ on_current_changed
end
-
- def on_forward
- fire_changed
- end
-
- def on_back
- fire_changed
- end
-
- def fire_changed
+
+ def on_current_changed
fire :change_current => index(@history.current, 0)
end
--
2.11.4.GIT