Summary: | automatically select next item after delete | ||
---|---|---|---|
Product: | [Applications] akregator | Reporter: | jason fuchs <jasonfuchs> |
Component: | general | Assignee: | kdepim bugs <kdepim-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | adeptsmail, andreas, dominik.tritscher, ewoerner, kde-2011.08, L.Bonnaud, lehoangphuongbg, montel, nicodorn, rulatir, tlueber, xaver.xn |
Priority: | NOR | Keywords: | triaged |
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Gentoo Packages | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | 4.8.5 | |
Sentry Crash Report: |
Description
jason fuchs
2006-01-08 06:50:41 UTC
Classifying as (usability) bug instead wishlist. SVN commit 496329 by osterfeld: select the next article in the article list when deleting the only selected article (doesn't apply when deleting multiple articles) BUG: 119724 M +2 -0 ChangeLog M +48 -1 src/articlelistview.cpp --- branches/KDE/3.5/kdepim/akregator/ChangeLog #496328:496329 @@ -7,6 +7,8 @@ Bug fixes: + 2006/01/10 Select next item in article list when deleting the selected article + (single selection mode only) (#119724) -fo 2006/01/10 Fix item handling in the feed list, avoid crashes as happening after moving a folder and deleting a subitem afterwards (#118659) -fo --- branches/KDE/3.5/kdepim/akregator/src/articlelistview.cpp #496328:496329 @@ -368,6 +368,12 @@ { setUpdatesEnabled(false); + // if only one item is selected and this selected item + // is deleted, we will select the next item in the list + bool singleSelected = selectedArticles().count() == 1; + + QListViewItem* next = 0; // the item to select if a selected item is deleted + for (QValueList<Article>::ConstIterator it = list.begin(); it != list.end(); ++it) { @@ -375,8 +381,16 @@ { ArticleItem* ali = d->articleMap[*it]; - if ((*it).isDeleted()) // if article was set to deleted, delete item + if (ali && (*it).isDeleted()) // if article was set to deleted, delete item { + if (singleSelected && ali->isSelected()) + { + if (ali->itemBelow()) + next = ali->itemBelow(); + else if (ali->itemAbove()) + next = ali->itemAbove(); + } + d->articleMap.remove(*it); delete ali; } @@ -390,22 +404,55 @@ } } + // if the only selected item was deleted, select + // an item next to it + if (singleSelected && next != 0) + { + setSelected(next, true); + setCurrentItem(next); + } + setUpdatesEnabled(true); triggerUpdate(); } void ArticleListView::slotArticlesRemoved(TreeNode* /*node*/, const QValueList<Article>& list) { + // if only one item is selected and this selected item + // is deleted, we will select the next item in the list + bool singleSelected = selectedArticles().count() == 1; + + QListViewItem* next = 0; // the item to select if a selected item is deleted + setUpdatesEnabled(false); + for (QValueList<Article>::ConstIterator it = list.begin(); it != list.end(); ++it) { if (d->articleMap.contains(*it)) { ArticleItem* ali = d->articleMap[*it]; d->articleMap.remove(*it); + + if (singleSelected && ali->isSelected()) + { + if (ali->itemBelow()) + next = ali->itemBelow(); + else if (ali->itemAbove()) + next = ali->itemAbove(); + } + delete ali; } } + + // if the only selected item was deleted, select + // an item next to it + if (singleSelected && next != 0) + { + setSelected(next, true); + setCurrentItem(next); + } + setUpdatesEnabled(true); triggerUpdate(); } *** Bug 118229 has been marked as a duplicate of this bug. *** This bug seems to have cropped up again in Akregator 1.2.50 on KDE 4.1 beta 2. Should I start a new bug, or reopen this one? To clarify, when deleting an entry, the next entry shows in the view pane, however, it is not selected. Therefore, the entry cannot be scrolled nor deleted. This bug still exists in Akregator 1.3.3 from KDE 4.1.3 This Bug still exists in Akregator 1.3.4 on KDE 4.1.4 (Kubuntu-Packages) Fixed in KDE 4.2. http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=529227 says the bug is still present in 4.2.2 and 4.3.4 And I can reproduce it in KDE SC 4.4.1 Reopening this KDE3 report is not needed. There's already bug 190616 for KDE4. (In reply to comment #10) > Reopening this KDE3 report is not needed. There's already bug 190616 for KDE4. I don't want to nitpick, but everything from comment #4 on is related to KDE 4. Comment #4 is from 2008 which predates bug 190616 by almost a year and therefore makes it a duplicate. *** Bug 190616 has been marked as a duplicate of this bug. *** Unfortunately, I can confirm this behaviour for Akregator 1.6.2/KDE SC 4.4.2 (Kubuntu). This bug still exists in KDE 4.4.3 ;-( Confirmed also for 4.5.4. *** Bug 278937 has been marked as a duplicate of this bug. *** This bug still exists in akregator 4.7.0. This bug still exists in Akregator 4.8.0, and is now 3.5 years old. Developers helllloooooooo? Is it really that hard to fix? Akregator 4.8.2, Kubuntu 12.04. Bug still here The bug is fixed in latest commit. KDE 4.9: http://commits.kde.org/kdepim/244f18a4d9813f064c95dce0db426d52bda84617 KDE 4.8.5: http://commits.kde.org/kdepim/807c0aa23de75a9eb67c8e3f00fc992efbb4c930 KDE 4.10: http://commits.kde.org/kdepim/86f5008a2558e488c2fae82cd0df3caff252bf6a Please help me close this bug because I do not have the permission to do that. |