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) void UBGraphicsItemDelegate::showHide(bool show)
{ {
if (show) if (show) {
{
mDelegated->setData(UBGraphicsItemData::ItemLayerType, QVariant(UBItemLayerType::Object)); mDelegated->setData(UBGraphicsItemData::ItemLayerType, QVariant(UBItemLayerType::Object));
} if (mDelegated->childItems().count()) {
else foreach (QGraphicsItem *item, mDelegated->childItems()) {
{ item->setData(UBGraphicsItemData::ItemLayerType, QVariant(UBItemLayerType::Object));
}
}
} else {
mDelegated->setData(UBGraphicsItemData::ItemLayerType, QVariant(UBItemLayerType::Control)); 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(); mDelegated->update();
emit showOnDisplayChanged(show); emit showOnDisplayChanged(show);

Loading…
Cancel
Save