mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-18 13:30:34 +01:00
Bug fix : element editor, part text can't be edited directly.
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5335 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -194,7 +194,17 @@ void ElementScene::keyPressEvent(QKeyEvent *event)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(selectedItems().size() == 1)
|
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();
|
QGraphicsObject *qgo = selectedItems().first()->toGraphicsObject();
|
||||||
if(qgo)
|
if(qgo)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user