changeset 131:2550aaa09240

* Add connecting line to uncommitted item; turn Revert icon blue; cut down menus to things that actually work (well, mostly)
author Chris Cannam
date Tue, 30 Nov 2010 11:17:30 +0000
parents 9ae4cc0055e8
children 16ceeee30e2a
files images/undo.png mainwindow.cpp panned.cpp panner.cpp uncommitteditem.cpp
diffstat 5 files changed, 12 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
Binary file images/undo.png has changed
--- a/mainwindow.cpp	Mon Nov 29 20:58:50 2010 +0000
+++ b/mainwindow.cpp	Tue Nov 30 11:17:30 2010 +0000
@@ -1632,16 +1632,18 @@
 void MainWindow::createMenus()
 {
     fileMenu = menuBar()->addMenu(tr("File"));
-    fileMenu -> addAction(hgInitAct);
+/*    fileMenu -> addAction(hgInitAct);
     fileMenu -> addAction(hgCloneFromRemoteAct);
     fileMenu->addAction(clearSelectionsAct); //!!! can't live here!
     fileMenu -> addSeparator();
+*/
     fileMenu -> addAction(openAct);
     fileMenu -> addAction(settingsAct);
     fileMenu -> addSeparator();
     fileMenu -> addAction(exitAct);
 
     advancedMenu = menuBar()->addMenu(tr("Advanced"));
+/*
     advancedMenu -> addAction(hgUpdateToRevAct);
     advancedMenu -> addSeparator();
     advancedMenu -> addAction(hgAnnotateAct);
@@ -1652,6 +1654,7 @@
     advancedMenu -> addSeparator();
     advancedMenu -> addAction(hgTagAct);
     advancedMenu -> addSeparator();
+*/
     advancedMenu -> addAction(hgIgnoreAct);
     advancedMenu -> addSeparator();
     advancedMenu -> addAction(hgServeAct);
--- a/panned.cpp	Mon Nov 29 20:58:50 2010 +0000
+++ b/panned.cpp	Tue Nov 30 11:17:30 2010 +0000
@@ -16,6 +16,7 @@
 */
 
 #include "panned.h"
+#include "debug.h"
 
 #include <QScrollBar>
 #include <QWheelEvent>
@@ -31,6 +32,8 @@
 void
 Panned::resizeEvent(QResizeEvent *ev)
 {
+    DEBUG << "Panned::resizeEvent()" << endl;
+
     QPointF nearpt = mapToScene(0, 0);
     QPointF farpt = mapToScene(width(), height());
     QSizeF sz(farpt.x()-nearpt.x(), farpt.y()-nearpt.y());
--- a/panner.cpp	Mon Nov 29 20:58:50 2010 +0000
+++ b/panner.cpp	Tue Nov 30 11:17:30 2010 +0000
@@ -162,7 +162,7 @@
 {
     if (m_cache.size() != viewport()->size()) {
 
-        DEBUG << "Panner: recreating cache" << endl;
+        DEBUG << "Panner: cache size " << m_cache.size() << " != viewport size " << viewport()->size() << ": recreating cache" << endl;
 
         QGraphicsScene *s = scene();
         if (!s) return;
--- a/uncommitteditem.cpp	Mon Nov 29 20:58:50 2010 +0000
+++ b/uncommitteditem.cpp	Tue Nov 30 11:17:30 2010 +0000
@@ -34,10 +34,10 @@
 QRectF
 UncommittedItem::boundingRect() const
 {
-    //!!! this stuff is gross, refactor with changesetitem
+    //!!! this stuff is gross, refactor with changesetitem and connectionitem
     int w = 100;
     if (m_wide) w = 180;
-    return QRectF(-((w-50)/2 - 1), -30, w - 3, 79);
+    return QRectF(-((w-50)/2 - 1), -30, w - 3, 79 + 40);
 }
 
 void
@@ -77,6 +77,8 @@
     QRectF r(x0, 0, width - 3, height);
     paint->drawRect(r);
 
+    paint->drawLine(x0 + width/2, height, x0 + width/2, height + 40);
+
     QString label = tr("Uncommitted changes");
     paint->drawText(-(fm.width(label) - 50)/2, 25 - fm.height()/2 + fm.ascent(), label);