Mercurial > hg > easyhg
annotate changesetscene.cpp @ 135:908a1fdeed6a
* Ensure only one list can contain a selection at once in file status widget
author | Chris Cannam |
---|---|
date | Tue, 30 Nov 2010 13:08:18 +0000 |
parents | 1f27f71a7034 |
children | e6c6b88d19b9 |
rev | line source |
---|---|
Chris@119 | 1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */ |
Chris@119 | 2 |
Chris@119 | 3 /* |
Chris@119 | 4 EasyMercurial |
Chris@119 | 5 |
Chris@119 | 6 Based on HgExplorer by Jari Korhonen |
Chris@119 | 7 Copyright (c) 2010 Jari Korhonen |
Chris@119 | 8 Copyright (c) 2010 Chris Cannam |
Chris@119 | 9 Copyright (c) 2010 Queen Mary, University of London |
Chris@119 | 10 |
Chris@119 | 11 This program is free software; you can redistribute it and/or |
Chris@119 | 12 modify it under the terms of the GNU General Public License as |
Chris@119 | 13 published by the Free Software Foundation; either version 2 of the |
Chris@119 | 14 License, or (at your option) any later version. See the file |
Chris@119 | 15 COPYING included with this distribution for more information. |
Chris@119 | 16 */ |
Chris@119 | 17 |
Chris@119 | 18 #include "changesetscene.h" |
Chris@119 | 19 #include "changesetitem.h" |
Chris@119 | 20 |
Chris@119 | 21 ChangesetScene::ChangesetScene() |
Chris@119 | 22 : QGraphicsScene(), m_detailShown(0) |
Chris@119 | 23 { |
Chris@119 | 24 } |
Chris@119 | 25 |
Chris@119 | 26 void |
Chris@119 | 27 ChangesetScene::changesetDetailShown() |
Chris@119 | 28 { |
Chris@119 | 29 ChangesetItem *csi = qobject_cast<ChangesetItem *>(sender()); |
Chris@119 | 30 if (!csi) return; |
Chris@119 | 31 |
Chris@124 | 32 if (m_detailShown && m_detailShown != csi) { |
Chris@119 | 33 m_detailShown->hideDetail(); |
Chris@119 | 34 } |
Chris@119 | 35 m_detailShown = csi; |
Chris@119 | 36 } |
Chris@119 | 37 |