|
|
|
@ -1603,6 +1603,9 @@ void UBGraphicsScene::removeItem(QGraphicsItem* item) |
|
|
|
|
--mItemCount; |
|
|
|
|
|
|
|
|
|
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) |
|
|
|
@ -1956,9 +1959,8 @@ void UBGraphicsScene::addAristo(QPointF center) |
|
|
|
|
|
|
|
|
|
void UBGraphicsScene::addCache() |
|
|
|
|
{ |
|
|
|
|
UBGraphicsCache* cache = new UBGraphicsCache(); |
|
|
|
|
mTools << cache; |
|
|
|
|
|
|
|
|
|
UBGraphicsCache* cache = UBGraphicsCache::instance(this); |
|
|
|
|
if (!items().contains(cache)) { |
|
|
|
|
addItem(cache); |
|
|
|
|
|
|
|
|
|
cache->setData(UBGraphicsItemData::ItemLayerType, QVariant(UBItemLayerType::Tool)); |
|
|
|
@ -1967,6 +1969,7 @@ void UBGraphicsScene::addCache() |
|
|
|
|
cache->setSelected(true); |
|
|
|
|
UBApplication::boardController->notifyCache(true); |
|
|
|
|
UBApplication::boardController->notifyPageChanged(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void UBGraphicsScene::addMask(const QPointF ¢er) |
|
|
|
|