Mercurial > hg > easyhg
comparison changesetitem.cpp @ 132:16ceeee30e2a
* Ensure panned rect stays current when size changes; update panner cache when scene changes
author | Chris Cannam |
---|---|
date | Tue, 30 Nov 2010 11:41:46 +0000 |
parents | fcaf09ee825d |
children | aaeab914f2a3 |
comparison
equal
deleted
inserted
replaced
131:2550aaa09240 | 132:16ceeee30e2a |
---|---|
22 #include "colourset.h" | 22 #include "colourset.h" |
23 #include "debug.h" | 23 #include "debug.h" |
24 | 24 |
25 #include <QPainter> | 25 #include <QPainter> |
26 #include <QGraphicsScene> | 26 #include <QGraphicsScene> |
27 #include <QGraphicsSceneMouseEvent> | |
27 | 28 |
28 ChangesetItem::ChangesetItem(Changeset *cs) : | 29 ChangesetItem::ChangesetItem(Changeset *cs) : |
29 m_changeset(cs), m_detail(0), | 30 m_changeset(cs), m_detail(0), |
30 m_showBranch(false), m_column(0), m_row(0), m_wide(false), m_current(false) | 31 m_showBranch(false), m_column(0), m_row(0), m_wide(false), m_current(false) |
31 { | 32 { |
72 | 73 |
73 void | 74 void |
74 ChangesetItem::mousePressEvent(QGraphicsSceneMouseEvent *e) | 75 ChangesetItem::mousePressEvent(QGraphicsSceneMouseEvent *e) |
75 { | 76 { |
76 DEBUG << "ChangesetItem::mousePressEvent" << endl; | 77 DEBUG << "ChangesetItem::mousePressEvent" << endl; |
77 if (m_detail) { | 78 if (e->button() == Qt::LeftButton) { |
78 hideDetail(); | 79 if (m_detail) { |
79 } else { | 80 hideDetail(); |
80 showDetail(); | 81 } else { |
82 showDetail(); | |
83 } | |
81 } | 84 } |
82 } | 85 } |
83 | 86 |
84 void | 87 void |
85 ChangesetItem::paint(QPainter *paint, const QStyleOptionGraphicsItem *option, | 88 ChangesetItem::paint(QPainter *paint, const QStyleOptionGraphicsItem *option, |