[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: extragear/graphics/digikam
From: Johannes Wienke <languitar () semipol ! de>
Date: 2010-05-09 11:58:29
Message-ID: 20100509120252.3E4B3AC8B1 () svn ! kde ! org
[Download RAW message or body]
SVN commit 1124554 by jwienke:
Fix loading of date album on application start.
The problem was that DAlbums are created asynchronously. The sidebar tab was \
activated before the albums are loaded which resulted in setting 0x0 as current album \
because the tree view was not populated. To prevent this the DateFolderView now \
listens on signaleAllDAlbumsLoaded and re-sets the current album in the album manager \
if this signal occurs and the folder view is active.
BUG: 236002
M +1 -1 HACKING
M +2 -6 NEWS
M +3 -3 digikam/albumtreeview.cpp
M +15 -0 digikam/datefolderview.cpp
M +1 -0 digikam/datefolderview.h
--- trunk/extragear/graphics/digikam/HACKING #1124553:1124554
@@ -335,7 +335,7 @@
To generate API documentation, you need to install:
-- Doxygen program (http://www.doxygen.org).
+- Doxygen program (http://www.doxygen.org)
- Dot program (http://www.graphviz.org)
After cmake generated a Makefile you can call 'make doc'. A new subfolder named
--- trunk/extragear/graphics/digikam/NEWS #1124553:1124554
@@ -56,9 +56,5 @@
044 ==> 235171 : digiKam crashes when saving ratings to a raw (nef) file.
045 ==> 235600 : Color auto corrections are broken.
046 ==> 235902 : Preview of RAW image is nt updated if settings for import are \
changed.
-047 ==>
-
-
-
-
-
+047 ==> 236002 : Photos not visible when starting in calendar view.
+048 ==>
--- trunk/extragear/graphics/digikam/digikam/albumtreeview.cpp #1124553:1124554
@@ -626,7 +626,7 @@
Digikam::State state = stateStore.value(album->id());
/*
- kDebug() << "Trying to restore state of album " << album->title()
+ kDebug() << "Trying to restore state of album " << album->title() << "(" \
<<album->id() << ")" << ": state(selected = " << state.selected
<< ", expanded = " << state.expanded
<< ", currentIndex = " << state.currentIndex << ")" << this;
@@ -652,7 +652,7 @@
// restore the current index
if (state.currentIndex)
{
- //kDebug() << "Setting current index" << album->title();
+ //kDebug() << "Setting current index" << album->title() << "(" << \
album->id() << ")";
selectionModel()->setCurrentIndex(index, \
QItemSelectionModel::SelectCurrent
| QItemSelectionModel::Rows);
}
@@ -706,7 +706,7 @@
QModelIndexList selected = selectedIndexes();
if (!selected.isEmpty())
{
- scrollTo(selected.first());
+ scrollTo(selected.first(), PositionAtCenter);
}
}
--- trunk/extragear/graphics/digikam/digikam/datefolderview.cpp #1124553:1124554
@@ -89,6 +89,13 @@
connect(d->dateTreeView, SIGNAL(currentAlbumChanged(Album*)),
this, SLOT(slotSelectionChanged(Album*)));
+ // Loading of DAlbums may take longer that setting up the gui. Therefore
+ // the first call to setActive may not set the current album in the album
+ // manager as it is not yet loaded. To achieve this, we wait for loading
+ // DAlbums and set the active album in the album manager if this tab is
+ // active
+ connect(AlbumManager::instance(), SIGNAL(signalAllDAlbumsLoaded()),
+ this, SLOT(slotAllAlbumsLoaded()));
}
DateFolderView::~DateFolderView()
@@ -145,6 +152,14 @@
}
}
+void DateFolderView::slotAllAlbumsLoaded() {
+ if (d->active) {
+ AlbumManager::instance()->setCurrentAlbum(
+ d->dateTreeView->currentAlbum());
+ slotSelectionChanged(d->dateTreeView->currentAlbum());
+ }
+}
+
void DateFolderView::setConfigGroup(KConfigGroup group)
{
StateSavingObject::setConfigGroup(group);
--- trunk/extragear/graphics/digikam/digikam/datefolderview.h #1124553:1124554
@@ -74,6 +74,7 @@
private Q_SLOTS:
void slotSelectionChanged(Album* selectedAlbum);
+ void slotAllAlbumsLoaded();
private:
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic