the frame is correctly created for the mask tool

preferencesAboutTextFull
Claudio Valerio 12 years ago
parent 33e4ba44e8
commit afad2faa04
  1. 1
      src/domain/UBGraphicsItemDelegate.cpp
  2. 22
      src/tools/UBGraphicsCurtainItemDelegate.cpp

@ -815,7 +815,6 @@ UBGraphicsToolBarItem::UBGraphicsToolBarItem(QGraphicsItem * parent) :
rect.setWidth(parent->boundingRect().width()); rect.setWidth(parent->boundingRect().width());
this->setRect(rect); this->setRect(rect);
// setBrush(QColor(UBSettings::paletteColor));
setPen(Qt::NoPen); setPen(Qt::NoPen);
hide(); hide();

@ -32,7 +32,7 @@
#include "core/memcheck.h" #include "core/memcheck.h"
UBGraphicsCurtainItemDelegate::UBGraphicsCurtainItemDelegate(UBGraphicsCurtainItem* pDelegated, QObject * parent) UBGraphicsCurtainItemDelegate::UBGraphicsCurtainItemDelegate(UBGraphicsCurtainItem* pDelegated, QObject * parent)
: UBGraphicsItemDelegate(pDelegated, parent, GF_SCALABLE_ALL_AXIS | GF_MENU_SPECIFIED | GF_ZORDER_MANIPULATIONS_ALLOWED) : UBGraphicsItemDelegate(pDelegated, parent, GF_SCALABLE_ALL_AXIS | GF_MENU_SPECIFIED)
{ {
//NOOP //NOOP
} }
@ -45,9 +45,12 @@ UBGraphicsCurtainItemDelegate::~UBGraphicsCurtainItemDelegate()
void UBGraphicsCurtainItemDelegate::init() void UBGraphicsCurtainItemDelegate::init()
{ {
mFrame->hide(); if(!mFrame){
mZOrderUpButton->hide(); createControls();
mZOrderDownButton->hide(); mFrame->hide();
mZOrderUpButton->hide();
mZOrderDownButton->hide();
}
} }
@ -74,17 +77,6 @@ bool UBGraphicsCurtainItemDelegate::mousePressEvent(QGraphicsSceneMouseEvent *ev
QVariant UBGraphicsCurtainItemDelegate::itemChange(QGraphicsItem::GraphicsItemChange change, const QVariant &value) QVariant UBGraphicsCurtainItemDelegate::itemChange(QGraphicsItem::GraphicsItemChange change, const QVariant &value)
{ {
if (change == QGraphicsItem::ItemZValueHasChanged)
{
// mFrame->setZValue(mDelegated->zValue() + 1);
// foreach(DelegateButton* button, mButtons)
// {
// button->setZValue(mDelegated->zValue() + 2);
// button->setZValue(mDelegated->zValue() + 2);
// }
}
if (change == QGraphicsItem::ItemVisibleHasChanged) if (change == QGraphicsItem::ItemVisibleHasChanged)
{ {
UBGraphicsScene* ubScene = qobject_cast<UBGraphicsScene*>(mDelegated->scene()); UBGraphicsScene* ubScene = qobject_cast<UBGraphicsScene*>(mDelegated->scene());

Loading…
Cancel
Save