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

preferencesAboutTextFull
Claudio Valerio 11 years ago
parent 51a645c2e9
commit 832ebaac6c
  1. 2
      src/core/UBSceneCache.cpp

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

Loading…
Cancel
Save