Merge remote branch 'origin/master' into claudio-dev

preferencesAboutTextFull
Claudio Valerio 12 years ago
commit 3fe5c51f37
  1. 18
      src/domain/UBGraphicsItemDelegate.cpp
  2. 1
      src/domain/UBGraphicsItemDelegate.h

@ -471,18 +471,18 @@ void UBGraphicsItemDelegate::lock(bool locked)
mFrame->positionHandles(); mFrame->positionHandles();
} }
void UBGraphicsItemDelegate::showHideRecurs(const QVariant &pShow, QGraphicsItem *pItem)
void UBGraphicsItemDelegate::showHide(bool show)
{ {
if (show) pItem->setData(UBGraphicsItemData::ItemLayerType, pShow);
{ foreach (QGraphicsItem *insideItem, pItem->childItems()) {
mDelegated->setData(UBGraphicsItemData::ItemLayerType, QVariant(UBItemLayerType::Object)); showHideRecurs(pShow, insideItem);
}
else
{
mDelegated->setData(UBGraphicsItemData::ItemLayerType, QVariant(UBItemLayerType::Control));
} }
}
void UBGraphicsItemDelegate::showHide(bool show)
{
QVariant showFlag = QVariant(show ? UBItemLayerType::Object : UBItemLayerType::Control);
showHideRecurs(showFlag, mDelegated);
mDelegated->update(); mDelegated->update();
emit showOnDisplayChanged(show); emit showOnDisplayChanged(show);

@ -297,6 +297,7 @@ protected slots:
private: private:
void updateFrame(); void updateFrame();
void updateButtons(bool showUpdated = false); void updateButtons(bool showUpdated = false);
inline void showHideRecurs(const QVariant &pShow, QGraphicsItem *pItem);
QPointF mOffset; QPointF mOffset;
QTransform mPreviousTransform; QTransform mPreviousTransform;

Loading…
Cancel
Save