mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-02-10 10:09:58 +01:00
Minor refactoring of diagram event interface
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5706 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -39,9 +39,8 @@ DiagramEventAddText::~DiagramEventAddText()
|
||||
/**
|
||||
* @brief DiagramEventAddText::mousePressEvent
|
||||
* @param event : event of mouse press event.
|
||||
* @return : true if this event is handled, otherwise false
|
||||
*/
|
||||
bool DiagramEventAddText::mousePressEvent(QGraphicsSceneMouseEvent *event)
|
||||
void DiagramEventAddText::mousePressEvent(QGraphicsSceneMouseEvent *event)
|
||||
{
|
||||
if (event->button() == Qt::LeftButton)
|
||||
{
|
||||
@@ -50,7 +49,6 @@ bool DiagramEventAddText::mousePressEvent(QGraphicsSceneMouseEvent *event)
|
||||
text->setTextInteractionFlags(Qt::TextEditorInteraction);
|
||||
text->setFocus(Qt::MouseFocusReason);
|
||||
emit finish();
|
||||
return true;
|
||||
event->setAccepted(true);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user