[fondue-commits] [SCM] Fondue Font Editor branch, master, updated. 08b3bcdfd92d36098f89673d35f5eb6ff5f0559a

Eugeniy Meshcheryakov eugen at debian.org
Thu May 15 13:28:09 UTC 2008


The following commit has been merged in the master branch:
commit 5e151d0620aeb9ee617d4cbe616e5358179d0a68
Author: Eugeniy Meshcheryakov <eugen at debian.org>
Date:   Thu May 15 14:55:57 2008 +0200

    aacept() handled events

diff --git a/gui/glyphcell.cxx b/gui/glyphcell.cxx
index 2546c39..f0303a3 100644
--- a/gui/glyphcell.cxx
+++ b/gui/glyphcell.cxx
@@ -50,6 +50,8 @@ GlyphCell::GlyphCell(Glyph *glyph) : QGraphicsView(), m_glyph(glyph),
 
 void GlyphCell::wheelEvent(QWheelEvent *event)
 {
+	event->accept();
+
 	qreal scaleFactor = pow(2.0, -event->delta() / 120.0 / 4); // XXX check
 	qreal factor = matrix().scale(scaleFactor, scaleFactor).mapRect(QRectF(0, 0, 1, 1)).width();
 
@@ -145,22 +147,27 @@ void GlyphCell::keyPressEvent(QKeyEvent *e)
 				}
 			}
 		}
+		e->accept();
 		break;
 	case Qt::Key_Up:
 		if (!e->modifiers())
 			moveSelection(QPointF(0, -1));
+		e->accept();
 		break;
 	case Qt::Key_Down:
 		if (!e->modifiers())
 			moveSelection(QPointF(0, 1));
+		e->accept();
 		break;
 	case Qt::Key_Right:
 		if (!e->modifiers())
 			moveSelection(QPointF(1, 0));
+		e->accept();
 		break;
 	case Qt::Key_Left:
 		if (!e->modifiers())
 			moveSelection(QPointF(-1, 0));
+		e->accept();
 		break;
 	default:
 		/* do nothing */
@@ -224,6 +231,7 @@ void GlyphCell::mousePressEvent(QMouseEvent *event)
 		m_actionOrigin = event->pos();
 		setCursor(Qt::ClosedHandCursor);
 	}
+	event->accept();
 }
 
 void GlyphCell::mouseMoveEvent(QMouseEvent *event)
@@ -249,6 +257,7 @@ void GlyphCell::mouseMoveEvent(QMouseEvent *event)
 			m_actionOrigin = event->pos();
 		}
 	}
+	event->accept();
 //	qDebug() << "move";
 }
 
@@ -257,6 +266,8 @@ void GlyphCell::mouseReleaseEvent(QMouseEvent *event)
 	Q_UNUSED(event);
 	Q_ASSERT(scene());
 
+	event->accept();
+
 	if (m_rubberActive) {
 		Q_ASSERT(m_rubberBand);
 		m_rubberBand->hide();

-- 
Fondue Font Editor



More information about the fondue-commits mailing list