[qet] [3756] Add text and text field in element editor is now available

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


Revision: 3756
Author:   blacksun
Date:     2015-02-22 20:20:16 +0100 (Sun, 22 Feb 2015)
Log Message:
-----------
Add text and text field in element editor is now available

Modified Paths:
--------------
    branches/Qt5/sources/editor/esevent/eseventaddtext.cpp
    branches/Qt5/sources/editor/esevent/eseventaddtextfield.cpp

Modified: branches/Qt5/sources/editor/esevent/eseventaddtext.cpp
===================================================================
--- branches/Qt5/sources/editor/esevent/eseventaddtext.cpp	2015-02-22 12:11:13 UTC (rev 3755)
+++ branches/Qt5/sources/editor/esevent/eseventaddtext.cpp	2015-02-22 19:20:16 UTC (rev 3756)
@@ -29,7 +29,8 @@
 ESEventAddText::ESEventAddText(ElementScene *scene) :
 	ESEventInterface(scene)
 {
-	m_text = new PartText(m_editor, 0, m_scene);
+	m_text = new PartText(m_editor);
+	m_scene -> addItem(m_text);
 	m_running = true;
 }
 
@@ -62,7 +63,8 @@
 		m_scene -> undoStack().push(new AddPartCommand(QObject::tr("Texte"), m_scene, m_text));
 
 		//Set new text
-		m_text = new PartText(m_editor, 0, m_scene);
+		m_text = new PartText(m_editor);
+		m_scene -> addItem(m_text);
 		m_text -> setPos(m_scene -> snapToGrid(event -> scenePos()));
 
 		return true;

Modified: branches/Qt5/sources/editor/esevent/eseventaddtextfield.cpp
===================================================================
--- branches/Qt5/sources/editor/esevent/eseventaddtextfield.cpp	2015-02-22 12:11:13 UTC (rev 3755)
+++ branches/Qt5/sources/editor/esevent/eseventaddtextfield.cpp	2015-02-22 19:20:16 UTC (rev 3756)
@@ -29,7 +29,8 @@
 ESEventAddTextField::ESEventAddTextField(ElementScene *scene) :
 	ESEventInterface(scene)
 {
-	m_text = new PartTextField(m_editor, 0, m_scene);
+	m_text = new PartTextField(m_editor);
+	m_scene -> addItem(m_text);
 	m_running = true;
 }
 
@@ -62,7 +63,8 @@
 		m_scene -> undoStack().push(new AddPartCommand(QObject::tr("Champ texte"), m_scene, m_text));
 
 		//Set new text
-		m_text = new PartTextField(m_editor, 0, m_scene);
+		m_text = new PartTextField(m_editor);
+		m_scene -> addItem(m_text);
 		m_text -> setPos(m_scene -> snapToGrid(event -> scenePos()));
 
 		return true;


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