Commit afad2faa authored by Claudio Valerio's avatar Claudio Valerio

the frame is correctly created for the mask tool

parent 33e4ba44
...@@ -815,7 +815,6 @@ UBGraphicsToolBarItem::UBGraphicsToolBarItem(QGraphicsItem * parent) : ...@@ -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 @@ ...@@ -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() ...@@ -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 ...@@ -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());
......
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