Element editor : Element primitive decorator doesn't manage anymore the text field when a single text is selected

git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5000 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
blacksun
2017-08-01 19:37:04 +00:00
parent b9013a8914
commit 86cb13f74d
11 changed files with 126 additions and 542 deletions

View File

@@ -1064,12 +1064,8 @@ void ElementScene::managePrimitivesGroups()
// should we hide the decorator?
QList<QGraphicsItem *> selected_items = zItems(ElementScene::Selected | ElementScene::IncludeTerminals);
if (selected_items.size() == 0)
if (selected_items.size() <= 1)
m_decorator -> hide();
else if (selected_items.size() == 1 &&
selected_items.first()->type() != PartText::Type &&
selected_items.first()->type() != PartTextField::Type)
m_decorator->hide();
else
{
m_decorator -> setZValue(1000000);