From 0aded817280cb6a0254318b22e61dbeaa6d26262 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Duval?= Date: Tue, 6 Nov 2007 23:35:07 +0000 Subject: [PATCH] clean the background for all workspaces when no image is selected this fixes bug #1602 git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22848 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/preferences/backgrounds/BackgroundsView.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/preferences/backgrounds/BackgroundsView.cpp b/src/preferences/backgrounds/BackgroundsView.cpp index d53e9e01da..a2d1da6822 100644 --- a/src/preferences/backgrounds/BackgroundsView.cpp +++ b/src/preferences/backgrounds/BackgroundsView.cpp @@ -607,13 +607,15 @@ BackgroundsView::Save() fCurrentInfo = NULL; } } - } else if (fLastImageIndex > -1) { + } else { fCurrent->RemoveAll(); - fCurrentInfo = new BackgroundImage::BackgroundImageInfo( - B_ALL_WORKSPACES, fLastImageIndex, mode, offset, - textWidgetLabelOutline, fCurrent->GetShowingImageSet(), - fCurrentInfo->fCacheMode); - fCurrent->Add(fCurrentInfo); + if (fLastImageIndex > -1) { + fCurrentInfo = new BackgroundImage::BackgroundImageInfo( + B_ALL_WORKSPACES, fLastImageIndex, mode, offset, + textWidgetLabelOutline, fCurrent->GetShowingImageSet(), + fCurrentInfo->fCacheMode); + fCurrent->Add(fCurrentInfo); + } } } else if (fLastImageIndex > -1) { if (fWorkspaceMenu->FindItem(kMsgCurrentWorkspace)->IsMarked()) {