[gitg] Do not add selections as mainlines for headers
- From: Jesse van den Kieboom <jessevdk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gitg] Do not add selections as mainlines for headers
- Date: Tue, 23 Dec 2014 17:02:46 +0000 (UTC)
commit 70bbc79c2911f516dcecca3fbf01845349e23d2b
Author: Jesse van den Kieboom <jessevdk gmail com>
Date: Tue Dec 23 18:02:01 2014 +0100
Do not add selections as mainlines for headers
gitg/history/gitg-history-refs-list.vala | 5 +++++
gitg/history/gitg-history.vala | 3 ++-
2 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/gitg/history/gitg-history-refs-list.vala b/gitg/history/gitg-history-refs-list.vala
index 25e2389..893bee6 100644
--- a/gitg/history/gitg-history-refs-list.vala
+++ b/gitg/history/gitg-history-refs-list.vala
@@ -790,6 +790,11 @@ public class RefsList : Gtk.ListBox
}
}
+ public bool is_header
+ {
+ get { return (get_selected_row() as RefHeader) != null; }
+ }
+
public bool is_all
{
get
diff --git a/gitg/history/gitg-history.vala b/gitg/history/gitg-history.vala
index 1da862d..5324962 100644
--- a/gitg/history/gitg-history.vala
+++ b/gitg/history/gitg-history.vala
@@ -674,6 +674,7 @@ namespace GitgHistory
(Gee.EqualDataFunc)Ggit.OId.equal);
var isall = d_main.refs_list.is_all;
+ var isheader = d_main.refs_list.is_header;
var perm_uniq = new Gee.HashSet<Ggit.OId>((Gee.HashDataFunc)Ggit.OId.hash,
(Gee.EqualDataFunc)Ggit.OId.equal);
@@ -723,7 +724,7 @@ namespace GitgHistory
{
d_selected.add(id);
- if (perm_uniq.add(id))
+ if (!isheader && perm_uniq.add(id))
{
permanent += id;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]