Commit 3f263533 authored by Ilia Ryabokon's avatar Ilia Ryabokon

Sankore-958 Hide groups on extended screen

parent db10e4fb
......@@ -474,15 +474,21 @@ void UBGraphicsItemDelegate::lock(bool locked)
void UBGraphicsItemDelegate::showHide(bool show)
{
if (show)
{
if (show) {
mDelegated->setData(UBGraphicsItemData::ItemLayerType, QVariant(UBItemLayerType::Object));
if (mDelegated->childItems().count()) {
foreach (QGraphicsItem *item, mDelegated->childItems()) {
item->setData(UBGraphicsItemData::ItemLayerType, QVariant(UBItemLayerType::Object));
}
else
{
}
} else {
mDelegated->setData(UBGraphicsItemData::ItemLayerType, QVariant(UBItemLayerType::Control));
if (mDelegated->childItems().count()) {
foreach (QGraphicsItem *item, mDelegated->childItems()) {
item->setData(UBGraphicsItemData::ItemLayerType, QVariant(UBItemLayerType::Control));
}
}
}
mDelegated->update();
emit showOnDisplayChanged(show);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment