Commit 869e4cdd authored by Claudio Valerio's avatar Claudio Valerio

hacked the frame bahaviour. To be removed

parent a62dfe29
This diff is collapsed.
...@@ -641,6 +641,7 @@ void UBGraphicsItemDelegate::onZoomChanged() ...@@ -641,6 +641,7 @@ void UBGraphicsItemDelegate::onZoomChanged()
void UBGraphicsItemDelegate::buildButtons() void UBGraphicsItemDelegate::buildButtons()
{ {
} }
void UBGraphicsItemDelegate::freeButtons() void UBGraphicsItemDelegate::freeButtons()
{ {
//Previously deleted with the frame //Previously deleted with the frame
......
...@@ -46,13 +46,14 @@ UBGraphicsTextItem::UBGraphicsTextItem(QGraphicsItem * parent) : ...@@ -46,13 +46,14 @@ UBGraphicsTextItem::UBGraphicsTextItem(QGraphicsItem * parent) :
{ {
setDelegate(new UBGraphicsTextItemDelegate(this, 0)); setDelegate(new UBGraphicsTextItemDelegate(this, 0));
// TODO claudio remove this because in contrast with the fact the frame should be created on demand.
Delegate()->createControls();
Delegate()->frame()->setOperationMode(UBGraphicsDelegateFrame::Resizing); Delegate()->frame()->setOperationMode(UBGraphicsDelegateFrame::Resizing);
Delegate()->setUBFlag(GF_FLIPPABLE_ALL_AXIS, false); Delegate()->setUBFlag(GF_FLIPPABLE_ALL_AXIS, false);
Delegate()->setUBFlag(GF_REVOLVABLE, true); Delegate()->setUBFlag(GF_REVOLVABLE, true);
mTypeTextHereLabel = tr("<Type Text Here>"); mTypeTextHereLabel = tr("<Type Text Here>");
setData(UBGraphicsItemData::ItemLayerType, UBItemLayerType::Object); setData(UBGraphicsItemData::ItemLayerType, UBItemLayerType::Object);
setData(UBGraphicsItemData::itemLayerType, QVariant(itemLayerType::ObjectItem)); //Necessary to set if we want z value to be assigned correctly setData(UBGraphicsItemData::itemLayerType, QVariant(itemLayerType::ObjectItem)); //Necessary to set if we want z value to be assigned correctly
......
...@@ -42,7 +42,7 @@ const int UBGraphicsTextItemDelegate::sMinPixelSize = 8; ...@@ -42,7 +42,7 @@ const int UBGraphicsTextItemDelegate::sMinPixelSize = 8;
const int UBGraphicsTextItemDelegate::sMinPointSize = 8; const int UBGraphicsTextItemDelegate::sMinPointSize = 8;
UBGraphicsTextItemDelegate::UBGraphicsTextItemDelegate(UBGraphicsTextItem* pDelegated, QObject *) UBGraphicsTextItemDelegate::UBGraphicsTextItemDelegate(UBGraphicsTextItem* pDelegated, QObject *)
: UBGraphicsItemDelegate(pDelegated,0, GF_COMMON | GF_REVOLVABLE) : UBGraphicsItemDelegate(pDelegated,0, GF_COMMON | GF_REVOLVABLE | GF_TOOLBAR_USED)
, mLastFontPixelSize(-1) , mLastFontPixelSize(-1)
, delta(5) , delta(5)
{ {
......
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