Commit 832ebaac authored by Claudio Valerio's avatar Claudio Valerio

using isActive instead of couting the viewer to know if the scene can be removed

parent 51a645c2
......@@ -128,7 +128,7 @@ void UBSceneCache::removeScene(UBDocumentProxy* proxy, int pageIndex)
{
UBGraphicsScene* scene = value(proxy, pageIndex);
if (scene && scene->views().size() == 0)
if (scene && !scene->isActive())
{
UBSceneCacheID key(proxy, pageIndex);
int count = QHash<UBSceneCacheID, UBGraphicsScene*>::remove(key);
......
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