Element editor : add handler for modifie primitives

git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4058 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
blacksun
2015-07-20 17:45:37 +00:00
parent effa4e9997
commit c885ce3d7a
18 changed files with 543 additions and 42 deletions

View File

@@ -1031,11 +1031,16 @@ void ElementScene::managePrimitivesGroups() {
decorator_ -> hide();
}
// should we hide the decorator?
// should we hide the decorator?
QList<QGraphicsItem *> selected_items = zItems(ElementScene::Selected | ElementScene::IncludeTerminals);
if (!selected_items.count()) {
if (selected_items.size() == 0)
decorator_ -> hide();
} else {
else if (selected_items.size() == 1 &&
selected_items.first()->type() != PartText::Type &&
selected_items.first()->type() != PartTextField::Type)
decorator_->hide();
else
{
decorator_ -> setZValue(1000000);
decorator_ -> setPos(0, 0);
decorator_ -> setItems(selected_items);