[chronojump] Changing a person updates result treeviews for jump/Rj/run/runI
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] Changing a person updates result treeviews for jump/Rj/run/runI
- Date: Fri, 7 Feb 2020 12:18:09 +0000 (UTC)
commit b19d02ea9150db1289bf8d1ef392a0beef27ceac
Author: Xavier de Blas <xaviblas gmail com>
Date: Fri Feb 7 13:16:13 2020 +0100
Changing a person updates result treeviews for jump/Rj/run/runI
src/gui/app1/chronojump.cs | 6 ++++++
src/treeview/event.cs | 23 +++++++++++++++++++++++
2 files changed, 29 insertions(+)
---
diff --git a/src/gui/app1/chronojump.cs b/src/gui/app1/chronojump.cs
index 04902ac2..5d9c1493 100644
--- a/src/gui/app1/chronojump.cs
+++ b/src/gui/app1/chronojump.cs
@@ -1084,6 +1084,12 @@ public partial class ChronoJumpWindow
{
sensitiveLastTestButtons(false);
+ //update 4 results treeviews
+ myTreeViewJumps.SelectPerson(currentPerson.Name);
+ myTreeViewJumpsRj.SelectPerson(currentPerson.Name);
+ myTreeViewRuns.SelectPerson(currentPerson.Name);
+ myTreeViewRunsInterval.SelectPerson(currentPerson.Name);
+
//1) change on jumps, runs, pulse capture graph
if(current_menuitem_mode == Constants.Menuitem_modes.JUMPSSIMPLE)
{
diff --git a/src/treeview/event.cs b/src/treeview/event.cs
index 86686586..8431e646 100644
--- a/src/treeview/event.cs
+++ b/src/treeview/event.cs
@@ -344,6 +344,29 @@ public class TreeViewEvent
} while (treeview.Model.IterNext (ref iter));
}
+ //used to select person on results treeviews when personChanged
+ public void SelectPerson(string name)
+ {
+ TreeIter iter = new TreeIter();
+ if(! treeview.Model.GetIterFirst (out iter))
+ return;
+
+ do {
+ if(treeview.Model.GetValue (iter, 0).ToString() == name)
+ {
+ treeview.Selection.SelectIter(iter);
+
+ //scroll treeview if needed
+ TreePath path = store.GetPath (iter);
+ treeview.ScrollToCell (path, null, true, 0, 0);
+
+ return;
+ }
+ } while (treeview.Model.IterNext (ref iter));
+
+ Unselect(); //if not found: unselect all
+ }
+
public void SelectEvent(int uniqueID) {
TreeIter iter = new TreeIter();
treeview.Model.GetIterFirst ( out iter ) ;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]