Sankore-958 Hide groups on extended screen

preferencesAboutTextFull
Ilia Ryabokon 12 years ago
parent db10e4fbc0
commit 3f26353307
  1. 18
      src/domain/UBGraphicsItemDelegate.cpp

@ -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));
}
else
{
if (mDelegated->childItems().count()) {
foreach (QGraphicsItem *item, mDelegated->childItems()) {
item->setData(UBGraphicsItemData::ItemLayerType, QVariant(UBItemLayerType::Object));
}
}
} 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);

Loading…
Cancel
Save