|
|
@ -1603,6 +1603,9 @@ void UBGraphicsScene::removeItem(QGraphicsItem* item) |
|
|
|
--mItemCount; |
|
|
|
--mItemCount; |
|
|
|
|
|
|
|
|
|
|
|
mFastAccessItems.removeAll(item); |
|
|
|
mFastAccessItems.removeAll(item); |
|
|
|
|
|
|
|
/* delete the item if it is cache to allow its reinstanciation, because Cache implements design pattern Singleton. */ |
|
|
|
|
|
|
|
if (dynamic_cast<UBGraphicsCache*>(item)) |
|
|
|
|
|
|
|
UBCoreGraphicsScene::deleteItem(item); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void UBGraphicsScene::removeItems(const QSet<QGraphicsItem*>& items) |
|
|
|
void UBGraphicsScene::removeItems(const QSet<QGraphicsItem*>& items) |
|
|
@ -1956,9 +1959,8 @@ void UBGraphicsScene::addAristo(QPointF center) |
|
|
|
|
|
|
|
|
|
|
|
void UBGraphicsScene::addCache() |
|
|
|
void UBGraphicsScene::addCache() |
|
|
|
{ |
|
|
|
{ |
|
|
|
UBGraphicsCache* cache = new UBGraphicsCache(); |
|
|
|
UBGraphicsCache* cache = UBGraphicsCache::instance(this); |
|
|
|
mTools << cache; |
|
|
|
if (!items().contains(cache)) { |
|
|
|
|
|
|
|
|
|
|
|
addItem(cache); |
|
|
|
addItem(cache); |
|
|
|
|
|
|
|
|
|
|
|
cache->setData(UBGraphicsItemData::ItemLayerType, QVariant(UBItemLayerType::Tool)); |
|
|
|
cache->setData(UBGraphicsItemData::ItemLayerType, QVariant(UBItemLayerType::Tool)); |
|
|
@ -1967,6 +1969,7 @@ void UBGraphicsScene::addCache() |
|
|
|
cache->setSelected(true); |
|
|
|
cache->setSelected(true); |
|
|
|
UBApplication::boardController->notifyCache(true); |
|
|
|
UBApplication::boardController->notifyCache(true); |
|
|
|
UBApplication::boardController->notifyPageChanged(); |
|
|
|
UBApplication::boardController->notifyPageChanged(); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void UBGraphicsScene::addMask(const QPointF ¢er) |
|
|
|
void UBGraphicsScene::addMask(const QPointF ¢er) |
|
|
|