[qet] [2031] Element editor: keyboard shortcuts work again.

[ Thread Index | Date Index | More lists.tuxfamily.org/qet Archives ]


Revision: 2031
Author:   xavier
Date:     2013-02-09 20:07:08 +0100 (Sat, 09 Feb 2013)
Log Message:
-----------
Element editor: keyboard shortcuts work again.

Modified Paths:
--------------
    trunk/sources/editor/elementview.cpp
    trunk/sources/editor/elementview.h
    trunk/sources/editor/parttext.cpp
    trunk/sources/editor/parttextfield.cpp

Modified: trunk/sources/editor/elementview.cpp
===================================================================
--- trunk/sources/editor/elementview.cpp	2013-02-08 22:05:22 UTC (rev 2030)
+++ trunk/sources/editor/elementview.cpp	2013-02-09 19:07:08 UTC (rev 2031)
@@ -75,21 +75,6 @@
 }
 
 /**
-	Gere les evenements envoyes a la vue.
-	Methode reimplentee pour gerer le conflit de raccourcis avec Suppr
-	(supprimer une partie ou supprimer le caractere suivant)
-	@param e evenement a gerer
-*/
-bool ElementView::event(QEvent *e) {
-	if (e -> type() == QEvent::ShortcutOverride && scene_ -> focusItem()) {
-		e -> accept();
-		return(true);
-	}
-	return(QGraphicsView::event(e));
-}
-
-
-/**
 	Agrandit le schema (+33% = inverse des -25 % de zoomMoins())
 */
 void ElementView::zoomIn() {

Modified: trunk/sources/editor/elementview.h
===================================================================
--- trunk/sources/editor/elementview.h	2013-02-08 22:05:22 UTC (rev 2030)
+++ trunk/sources/editor/elementview.h	2013-02-09 19:07:08 UTC (rev 2031)
@@ -42,7 +42,6 @@
 	QRectF viewedSceneRect() const;
 	
 	protected:
-	bool event(QEvent *);
 	void mousePressEvent(QMouseEvent *);
 	void wheelEvent(QWheelEvent *);
 	virtual void drawBackground(QPainter *, const QRectF &);

Modified: trunk/sources/editor/parttext.cpp
===================================================================
--- trunk/sources/editor/parttext.cpp	2013-02-08 22:05:22 UTC (rev 2030)
+++ trunk/sources/editor/parttext.cpp	2013-02-09 19:07:08 UTC (rev 2031)
@@ -541,6 +541,9 @@
 	setTextCursor(qtc);
 	
 	setEditable(false);
+	if (decorator_) {
+		decorator_ -> setFocus();
+	}
 }
 
 #ifdef QET_DEBUG_EDITOR_TEXTS

Modified: trunk/sources/editor/parttextfield.cpp
===================================================================
--- trunk/sources/editor/parttextfield.cpp	2013-02-08 22:05:22 UTC (rev 2030)
+++ trunk/sources/editor/parttextfield.cpp	2013-02-09 19:07:08 UTC (rev 2031)
@@ -520,6 +520,9 @@
 	setTextCursor(qtc);
 	
 	setEditable(false);
+	if (decorator_) {
+		decorator_ -> setFocus();
+	}
 }
 
 #ifdef QET_DEBUG_EDITOR_TEXTS


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/