[qet] qet/qet: [5335] Bug fix : element editor, part text can' t be edited directly.

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


Revision: 5335
Author:   blacksun
Date:     2018-04-19 11:22:08 +0200 (Thu, 19 Apr 2018)
Log Message:
-----------
Bug fix : element editor, part text can't be edited directly.

Modified Paths:
--------------
    trunk/sources/editor/elementscene.cpp

Modified: trunk/sources/editor/elementscene.cpp
===================================================================
--- trunk/sources/editor/elementscene.cpp	2018-04-14 12:21:07 UTC (rev 5334)
+++ trunk/sources/editor/elementscene.cpp	2018-04-19 09:22:08 UTC (rev 5335)
@@ -194,7 +194,17 @@
 	}
 	
 	if(selectedItems().size() == 1)
-	{	
+	{
+		if(selectedItems().first()->type() == PartText::Type)
+		{
+			PartText *t = static_cast<PartText *>(selectedItems().first());
+			if(t->textInteractionFlags() & Qt::TextEditorInteraction)
+			{
+				QGraphicsScene::keyPressEvent(event);
+				return;
+			}
+		}
+		
 		QGraphicsObject *qgo = selectedItems().first()->toGraphicsObject();
 		if(qgo)
 		{


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