[Digikam-devel] [Bug 129450] cannot exit preview mode within empty album
Gilles Caulier
caulier.gilles at free.fr
Tue Jun 20 07:38:24 BST 2006
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
http://bugs.kde.org/show_bug.cgi?id=129450
------- Additional Comments From caulier.gilles free fr 2006-06-20 08:38 -------
SVN commit 553136 by cgilles:
digikam from trunk : fix image preview mode rules with empty album
CCBUGS: 129450
M +1 -1 albumwidgetstack.h
M +13 -6 digikamview.cpp
M +0 -5 imagepreviewwidget.cpp
M +1 -1 imagepreviewwidget.h
--- trunk/extragear/graphics/digikam/digikam/albumwidgetstack.h #553135:553136
@ -58,7 +58,7 @
AlbumIconView* albumIconView();
ImagePreviewWidget* imagePreviewWidget();
- void setPreviewItem(const QString& path);
+ void setPreviewItem(const QString& path=QString::null);
int previewMode(void);
void setPreviewMode(int mode);
--- trunk/extragear/graphics/digikam/digikam/digikamview.cpp #553135:553136
@ -130,7 +130,7 @
d->iconView = d->albumPreviews->albumIconView();
d->rightSideBar = new ImagePropertiesSideBarDB(this, "Digikam Right Sidebar", d->splitter,
- Sidebar::Right, true, true);
+ Sidebar::Right, true, true);
// To the left.
d->folderView = new AlbumFolderView(this);
@ -323,7 +323,7 @
void DigikamView::slotAllAlbumsLoaded()
{
disconnect(d->albumManager, SIGNAL(signalAllAlbumsLoaded()),
- this, SLOT(slotAllAlbumsLoaded()));
+ this, SLOT(slotAllAlbumsLoaded()));
loadViewState();
Album *album = d->albumManager->findAlbum(d->initialAlbumID);
@ -576,14 +576,17 @
selected = true;
AlbumIconItem *firstSelectedItem = d->iconView->firstSelectedItem();
d->rightSideBar->itemChanged(firstSelectedItem->imageInfo()->kurl(),
- d->iconView, firstSelectedItem, 0, 0);
+ d->iconView, firstSelectedItem, 0, 0);
d->albumPreviews->setPreviewItem(firstSelectedItem->imageInfo()->kurl().path());
break;
}
}
if (!selected)
+ {
+ d->albumPreviews->setPreviewItem();
emit signal_noCurrentItem();
+ }
emit signal_imageSelected(selected);
}
@ -764,19 +767,23 @
{
if (d->albumPreviews->previewMode() == AlbumWidgetStack::PreviewAlbumMode)
{
- AlbumIconItem *item;
+ d->albumPreviews->setPreviewMode( AlbumWidgetStack::PreviewItemMode );
+ AlbumIconItem *item=0;
if (!iconItem)
{
item = d->iconView->firstSelectedItem();
- if (!item) return;
+ if (!item)
+ {
+ d->albumPreviews->setPreviewItem();
+ return;
+ }
}
else
{
item = iconItem;
}
- d->albumPreviews->setPreviewMode( AlbumWidgetStack::PreviewItemMode );
d->albumPreviews->setPreviewItem( item->imageInfo()->kurl().path() );
}
else
--- trunk/extragear/graphics/digikam/digikam/imagepreviewwidget.cpp #553135:553136
@ -33,8 +33,6 @
#include <kprocess.h>
#include <kdebug.h>
#include <klocale.h>
-#include <kapplication.h>
-#include <kfilemetainfo.h>
// Local includes.
@ -105,7 +103,6 @
{
if (path == d->path) return;
- kapp->setOverrideCursor( KCursor::waitCursor() );
d->path = path;
d->previewBlink = false;
d->blinkPreviewTimer->start(200);
@ -137,7 +134,6 @
d->pixmap = QPixmap(contentsRect().size());
updatePixmap();
repaint(false);
- kapp->restoreOverrideCursor();
emit previewUnderProgress(false);
}
@ -149,7 +145,6 @
d->pixmap = QPixmap(contentsRect().size());
updatePixmap();
repaint(false);
- kapp->restoreOverrideCursor();
emit previewUnderProgress(false);
}
--- trunk/extragear/graphics/digikam/digikam/imagepreviewwidget.h #553135:553136
@ -48,7 +48,7 @
ImagePreviewWidget(QWidget *parent=0);
~ImagePreviewWidget();
- void setImagePath(const QString& path);
+ void setImagePath(const QString& path=QString::null);
signals:
More information about the Digikam-devel
mailing list