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