mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-09-13 20:23:04 +02:00
Improve code style
This commit is contained in:
parent
574609abf5
commit
8a484ef901
@ -45,7 +45,11 @@ void DiagramEventAddText::mousePressEvent(QGraphicsSceneMouseEvent *event)
|
||||
if (event->button() == Qt::LeftButton)
|
||||
{
|
||||
IndependentTextItem *text = new IndependentTextItem();
|
||||
m_diagram -> undoStack().push(new AddItemCommand<IndependentTextItem *>(text, m_diagram, event->scenePos()));
|
||||
m_diagram -> undoStack().push(
|
||||
new AddItemCommand<IndependentTextItem *>(
|
||||
text,
|
||||
m_diagram,
|
||||
event->scenePos()));
|
||||
text->setTextInteractionFlags(Qt::TextEditorInteraction);
|
||||
text->setFocus(Qt::MouseFocusReason);
|
||||
emit finish();
|
||||
|
Loading…
x
Reference in New Issue
Block a user