Version: (using KDE Devel) Installed from: Compiled sources Compiler: gcc3.4.3 OS: Linux After removing of all images from particular day bolding in calendar view isn't removed immediately, have to switch to other month and return to grey out day. No significant Konsole output
SVN commit 439595 by pahlibar: when an item is deleted, update the date-filter view BUGS: 109703 M +30 -0 monthwidget.cpp M +2 -0 monthwidget.h --- trunk/extragear/graphics/digikam/digikam/monthwidget.cpp #439594:439595 @@ -77,6 +77,7 @@ m_days[i].active = false; m_days[i].selected = false; m_days[i].day = -1; + m_days[i].numImages = 0; } QDate d(year, month, 1); @@ -296,6 +297,9 @@ connect(AlbumLister::instance(), SIGNAL(signalNewItems(const ImageInfoList&)), SLOT(slotAddItems(const ImageInfoList&))); + connect(AlbumLister::instance(), + SIGNAL(signalDeleteItem(ImageInfo*)), + SLOT(slotDeleteItem(ImageInfo*))); } else { @@ -322,6 +326,7 @@ if (m_days[i].day == dt.date().day()) { m_days[i].active = true; + m_days[i].numImages++; break; } } @@ -330,4 +335,29 @@ update(); } +void MonthWidget::slotDeleteItem(ImageInfo* item) +{ + if (!m_active || !item) + return; + + QDateTime dt = item->dateTime(); + + for (int i=0; i<42; i++) + { + if (m_days[i].day == dt.date().day()) + { + m_days[i].numImages--; + if (m_days[i].numImages <= 0) + { + m_days[i].active = false; + m_days[i].numImages = 0; + } + + break; + } + } + + update(); +} + #include "monthwidget.moc" --- trunk/extragear/graphics/digikam/digikam/monthwidget.h #439594:439595 @@ -49,6 +49,7 @@ private slots: void slotAddItems(const ImageInfoList& items); + void slotDeleteItem(ImageInfo* item); private: @@ -57,6 +58,7 @@ bool active; bool selected; int day; + int numImages; }; bool m_active;
Not reproducible with 7.0.0-beta1