Resolved cache issue 336

preferencesAboutTextFull
shibakaneki 13 years ago
parent 698ec0e2c7
commit bc9a6693aa
  1. 1
      src/desktop/UBDesktopAnnotationController.cpp
  2. 27
      src/gui/UBCachePropertiesWidget.cpp

@ -918,7 +918,6 @@ void UBDesktopAnnotationController::updateMask(bool bTransparent)
// UBApplication::boardController->paletteManager()->mDesktopRightPalette // UBApplication::boardController->paletteManager()->mDesktopRightPalette
if(UBApplication::boardController->paletteManager()->rightPalette()->isVisible()) if(UBApplication::boardController->paletteManager()->rightPalette()->isVisible())
{ {
qDebug() << ">>>>>> Drawing the mask for the right palette";
p.drawRect(UBApplication::boardController->paletteManager()->rightPalette()->geometry().x(), p.drawRect(UBApplication::boardController->paletteManager()->rightPalette()->geometry().x(),
UBApplication::boardController->paletteManager()->rightPalette()->geometry().y(), UBApplication::boardController->paletteManager()->rightPalette()->geometry().y(),
UBApplication::boardController->paletteManager()->rightPalette()->width(), UBApplication::boardController->paletteManager()->rightPalette()->width(),

@ -205,16 +205,21 @@ UBCachePropertiesWidget::~UBCachePropertiesWidget()
void UBCachePropertiesWidget::onCloseClicked() void UBCachePropertiesWidget::onCloseClicked()
{ {
// Remove the current cache from the list if(!mCaches.empty())
mCaches.remove(mCaches.indexOf(mpCurrentCache)); {
// Remove the current cache from the list
mCaches.remove(mCaches.indexOf(mpCurrentCache));
// Remove the cache from the board // Remove the cache from the board
UBApplication::boardController->activeScene()->removeItem(mpCurrentCache); UBApplication::boardController->activeScene()->removeItem(mpCurrentCache);
mpCurrentCache = NULL; mpCurrentCache = NULL;
if(mCaches.empty()) if(mCaches.empty())
{ {
emit cacheListEmpty(); emit cacheListEmpty();
}
emit hideTab(name());
} }
} }
@ -321,8 +326,8 @@ void UBCachePropertiesWidget::updateCurrentCache()
// If we fall here, that means: // If we fall here, that means:
// 1 - that this page has no cache // 1 - that this page has no cache
// 2 - we do not on Board page // 2 - we are not in Board mode
// 3 - we in board mode, but show desktop (as really - desktop mode) // 3 - we are in Board mode, but show desktop (as really - Desktop mode)
emit hideTab(name()); emit hideTab(name());
mpCurrentCache = NULL; mpCurrentCache = NULL;
setDisabled(true); setDisabled(true);
@ -340,4 +345,4 @@ void UBCachePropertiesWidget::onCacheEnabled()
{ {
emit showTab(name()); emit showTab(name());
} }

Loading…
Cancel
Save