Summary: | updating of calendar view in Date panel | ||
---|---|---|---|
Product: | [Applications] digikam | Reporter: | Mikolaj Machowski <mikmach> |
Component: | Searches-Dates | Assignee: | Digikam Developers <digikam-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | caulier.gilles |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | 7.0.0 | |
Sentry Crash Report: |
Description
Mikolaj Machowski
2005-07-27 14:31:12 UTC
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 |