diff --git a/app/items/imagecategorizedview.cpp b/app/items/imagecategorizedview.cpp
index a8e5ace..fd5ef7d 100644
--- a/app/items/imagecategorizedview.cpp
+++ b/app/items/imagecategorizedview.cpp
@@ -296,32 +296,26 @@ QUrl ImageCategorizedView::currentUrl() const
     return currentInfo().fileUrl();
 }
 
-QList<ImageInfo> ImageCategorizedView::selectedImageInfos() const
+ImageInfoList ImageCategorizedView::selectedImageInfos() const
 {
-    return d->filterModel->imageInfos(selectedIndexes());
+    return resolveGrouping(selectedIndexes());
 }
 
-QList<ImageInfo> ImageCategorizedView::selectedImageInfosCurrentFirst() const
+ImageInfoList ImageCategorizedView::selectedImageInfosCurrentFirst() const
 {
-    QList<QModelIndex> indexes = selectedIndexes();
-    QModelIndex        current = currentIndex();
-    QList<ImageInfo>   infos;
+    QModelIndexList indexes = selectedIndexes();
+    const QModelIndex current  = currentIndex();
 
-    foreach(const QModelIndex& index, indexes)
+    if (!indexes.isEmpty())
     {
-        ImageInfo info = d->filterModel->imageInfo(index);
-
-        if (index == current)
-        {
-            infos.prepend(info);
-        }
-        else
+        if (indexes.first() != current)
         {
-            infos.append(info);
+            indexes.removeOne(current);
+            indexes.prepend(current);
         }
     }
 
-    return infos;
+    return resolveGrouping(indexes);
 }
 
 QList<ImageInfo> ImageCategorizedView::imageInfos() const
@@ -331,7 +325,7 @@ QList<ImageInfo> ImageCategorizedView::imageInfos() const
 
 QList<QUrl> ImageCategorizedView::urls() const
 {
-    QList<ImageInfo> infos = imageInfos();
+    ImageInfoList infos = imageInfos();
     QList<QUrl>       urls;
 
     foreach(const ImageInfo& info, infos)
@@ -344,7 +338,7 @@ QList<QUrl> ImageCategorizedView::urls() const
 
 QList<QUrl> ImageCategorizedView::selectedUrls() const
 {
-    QList<ImageInfo> infos = selectedImageInfos();
+    ImageInfoList infos = selectedImageInfos();
     QList<QUrl>       urls;
 
     foreach(const ImageInfo& info, infos)
@@ -723,6 +717,23 @@ void ImageCategorizedView::showContextMenuOnInfo(QContextMenuEvent*, const Image
     // implemented in subclass
 }
 
+ImageInfoList ImageCategorizedView::resolveGrouping(const QModelIndexList indexes) const
+{
+    ImageInfoList infos;
+
+    foreach(const ImageInfo& info, d->filterModel->imageInfos(indexes))
+    {
+        infos << info;
+
+        if (info.hasGroupedImages() && !imageFilterModel()->isGroupOpen(info.id()))
+        {
+            infos << info.groupedImages();
+        }
+    }
+    return infos;
+}
+
+
 void ImageCategorizedView::paintEvent(QPaintEvent* e)
 {
     // We want the thumbnails to be loaded in order.
diff --git a/app/items/imagecategorizedview.h b/app/items/imagecategorizedview.h
index aca0fa5..2b5d288 100644
--- a/app/items/imagecategorizedview.h
+++ b/app/items/imagecategorizedview.h
@@ -76,9 +76,9 @@ public:
     ImageInfo              currentInfo()           const;
     QUrl                   currentUrl()            const;
 
-    QList<ImageInfo>       selectedImageInfos()             const;
-    QList<ImageInfo>       selectedImageInfosCurrentFirst() const;
-    QList<QUrl>             selectedUrls()                   const;
+    ImageInfoList          selectedImageInfos()             const;
+    ImageInfoList          selectedImageInfosCurrentFirst() const;
+    QList<QUrl>            selectedUrls()                   const;
 
     QList<ImageInfo>       imageInfos()                     const;
     QList<QUrl>             urls()                           const;
@@ -205,6 +205,9 @@ protected:
     virtual void showContextMenuOnInfo(QContextMenuEvent* event, const ImageInfo& info);
     virtual void showContextMenuOnIndex(QContextMenuEvent* event, const QModelIndex& index);
 
+    // Converts indexes to imageInfos and adds group members when appropriate
+    ImageInfoList resolveGrouping(const QModelIndexList indexes) const;
+
 private Q_SLOTS:
 
     void slotIccSettingsChanged(const ICCSettingsContainer&, const ICCSettingsContainer&);
diff --git a/app/items/imageviewutilities.cpp b/app/items/imageviewutilities.cpp
index 46d814b..a6ce40c 100644
--- a/app/items/imageviewutilities.cpp
+++ b/app/items/imageviewutilities.cpp
@@ -105,33 +105,6 @@ bool ImageViewUtilities::deleteImages(const QList<ImageInfo>& infos, const Delet
 
     QList<ImageInfo> deleteInfos = infos;
 
-    foreach(const ImageInfo& info, infos)
-    {
-        if (info.hasGroupedImages())
-        {
-            QList<ImageInfo> groupedInfos;
-            bool infosGrouped = true;
-
-            foreach(const ImageInfo& group, info.groupedImages())
-            {
-                if (infos.contains(group))
-                {
-                    infosGrouped = false;
-                    break;
-                }
-                else
-                {
-                    groupedInfos << group;
-                }
-            }
-
-            if (infosGrouped)
-            {
-                deleteInfos << groupedInfos;
-            }
-        }
-    }
-
     QList<QUrl> urlList;
 
     foreach(const ImageInfo& info, deleteInfos)
diff --git a/app/views/tableview/tableview.cpp b/app/views/tableview/tableview.cpp
index 6a14e9c..8b62d8e 100644
--- a/app/views/tableview/tableview.cpp
+++ b/app/views/tableview/tableview.cpp
@@ -255,7 +255,7 @@ void TableView::showTreeViewContextMenuOnItem(QContextMenuEvent* const event, co
     cmHelper.addAction(viewAction);
     /// @todo image_edit is grayed out on first invocation of the menu for some reason
     cmHelper.addAction(QLatin1String("image_edit"));
-    cmHelper.addServicesMenu(s->tableViewModel->selectedUrls());
+    cmHelper.addServicesMenu(selectedUrls());
     cmHelper.addGotoMenu(selectedImageIds);
     cmHelper.addAction(QLatin1String("image_rotate"));
     cmHelper.addSeparator();
@@ -338,30 +338,6 @@ void TableView::showTreeViewContextMenuOnItem(QContextMenuEvent* const event, co
     }
 }
 
-QList<ImageInfo> TableView::selectedImageInfos() const
-{
-    const QModelIndexList selectedIndexes = s->tableViewSelectionModel->selectedRows();
-
-    return s->tableViewModel->imageInfos(selectedIndexes);
-}
-
-QList<ImageInfo> TableView::selectedImageInfosCurrentFirst() const
-{
-    QModelIndexList selectedIndexes = s->tableViewSelectionModel->selectedRows();
-    const QModelIndex cIndex        = s->tableViewSelectionModel->currentIndex();
-
-    if (!selectedIndexes.isEmpty())
-    {
-        if (selectedIndexes.first()!=cIndex)
-        {
-            selectedIndexes.removeOne(cIndex);
-            selectedIndexes.prepend(cIndex);
-        }
-    }
-
-    return s->tableViewModel->imageInfos(selectedIndexes);
-}
-
 void TableView::slotAssignColorLabelToSelected(const int colorLabelID)
 {
     FileActionMngr::instance()->assignColorLabel(selectedImageInfos(), colorLabelID);
@@ -403,25 +379,6 @@ ThumbnailSize TableView::getThumbnailSize() const
     return d->thumbnailSize;
 }
 
-QList<qlonglong> TableView::selectedImageIdsCurrentFirst() const
-{
-    const QModelIndexList selectedIndexes = s->tableViewSelectionModel->selectedRows();
-    QList<qlonglong> selectedImageIds     = s->tableViewModel->imageIds(selectedIndexes);
-    const QModelIndex currentIndex        = s->tableViewSelectionModel->currentIndex();
-    qlonglong currentId                   = s->tableViewModel->imageId(currentIndex);
-
-    if (currentId >= 0)
-    {
-        if (selectedImageIds.first()!=currentId)
-        {
-            selectedImageIds.removeOne(currentId);
-            selectedImageIds.prepend(currentId);
-        }
-    }
-
-    return selectedImageIds;
-}
-
 void TableView::slotInsertSelectedToExistingQueue(const int queueId)
 {
     const ImageInfoList imageInfoList = selectedImageInfos();
@@ -590,11 +547,6 @@ QList<QUrl> TableView::allUrls() const
     return resultList;
 }
 
-QList<QUrl> TableView::selectedUrls() const
-{
-    return s->tableViewModel->selectedUrls();
-}
-
 int TableView::numberOfSelectedItems() const
 {
     return s->tableViewSelectionModel->selectedRows().count();
@@ -804,4 +756,63 @@ void TableView::slotSetActive(const bool isActive)
     }
 }
 
+ImageInfoList TableView::selectedImageInfos() const
+{
+    return resolveGrouping(s->tableViewSelectionModel->selectedRows());
+}
+
+QModelIndexList TableView::selectedIndexesCurrentFirst() const
+{
+    QModelIndexList indexes = s->tableViewSelectionModel->selectedRows();
+    const QModelIndex current = s->tableViewSelectionModel->currentIndex();
+
+    if (!indexes.isEmpty())
+    {
+        if (indexes.first() != current)
+        {
+            indexes.removeOne(current);
+            indexes.prepend(current);
+        }
+    }
+
+    return indexes;
+}
+
+ImageInfoList TableView::selectedImageInfosCurrentFirst() const
+{
+    return resolveGrouping(selectedIndexesCurrentFirst());
+}
+
+QList<qlonglong> TableView::selectedImageIdsCurrentFirst() const
+{
+    return resolveGrouping(selectedIndexesCurrentFirst()).toImageIdList();
+}
+
+QList<QUrl> TableView::selectedUrls() const
+{
+    return resolveGrouping(s->tableViewSelectionModel->selectedRows()).toImageUrlList();
+}
+
+ImageInfoList TableView::resolveGrouping(const QList<QModelIndex> indexes) const
+{
+    ImageInfoList infos;
+
+    foreach(const QModelIndex& index, indexes)
+    {
+        ImageInfo info = s->tableViewModel->imageInfo(index);
+
+        infos << info;
+
+        if (info.hasGroupedImages()
+            && (s->tableViewModel->groupingMode() == s->tableViewModel->GroupingMode::GroupingHideGrouped
+                || (s->tableViewModel->groupingMode() == s->tableViewModel->GroupingMode::GroupingShowSubItems
+                    && !s->treeView->isExpanded(index))))
+        {
+            infos << info.groupedImages();
+        }
+    }
+
+    return infos;
+}
+
 } // namespace Digikam
diff --git a/app/views/tableview/tableview.h b/app/views/tableview/tableview.h
index 3b84c05..20dc725 100644
--- a/app/views/tableview/tableview.h
+++ b/app/views/tableview/tableview.h
@@ -62,13 +62,9 @@ public:
 
     void setThumbnailSize(const ThumbnailSize& size);
     ThumbnailSize getThumbnailSize()                  const;
-    QList<qlonglong> selectedImageIdsCurrentFirst()   const;
-    QList<ImageInfo> selectedImageInfos()             const;
-    QList<ImageInfo> selectedImageInfosCurrentFirst() const;
     ImageInfo currentInfo();
     ImageInfoList allInfo()     const;
     QList<QUrl> allUrls()        const;
-    QList<QUrl> selectedUrls()   const;
     int numberOfSelectedItems() const;
     ImageInfo nextInfo()        const;
     ImageInfo previousInfo()    const;
@@ -77,6 +73,12 @@ public:
     void clearSelection();
     void invertSelection();
 
+    ImageInfoList      selectedImageInfos()             const;
+    QModelIndexList    selectedIndexesCurrentFirst()    const;
+    ImageInfoList      selectedImageInfosCurrentFirst() const;
+    QList<qlonglong>   selectedImageIdsCurrentFirst()   const;
+    QList<QUrl>        selectedUrls()                   const;
+
 protected:
 
     void doLoadState();
@@ -88,6 +90,9 @@ protected:
     Album* currentAlbum();
     QList<QAction*> getExtraGroupingActions(QObject*const parentObject) const;
 
+    // Converts indexes to imageInfos and adds group members when appropriate
+    ImageInfoList resolveGrouping(const QList<QModelIndex> indexes) const;
+
 public Q_SLOTS:
 
     void slotGoToRow(const int rowNumber, const bool relativeMove);
diff --git a/app/views/tableview/tableview_model.cpp b/app/views/tableview/tableview_model.cpp
index 655a256..72c17d8 100644
--- a/app/views/tableview/tableview_model.cpp
+++ b/app/views/tableview/tableview_model.cpp
@@ -1339,30 +1339,6 @@ QList<ImageInfo> TableViewModel::allImageInfo() const
     return infoList;
 }
 
-QList<QUrl> TableViewModel::selectedUrls() const
-{
-    return urlsFromIndexes(s->tableViewSelectionModel->selectedRows());
-}
-
-QList<QUrl> TableViewModel::urlsFromIndexes(const QModelIndexList& indexList) const
-{
-    QList<QUrl> resultList;
-
-    Q_FOREACH(const QModelIndex& index, indexList)
-    {
-        Item* const item     = itemFromIndex(index);
-        const ImageInfo info = infoFromItem(item);
-        const QUrl itemUrl   = info.fileUrl();
-
-        if (!itemUrl.isEmpty())
-        {
-            resultList << itemUrl;
-        }
-    }
-
-    return resultList;
-}
-
 TableViewModel::GroupingMode TableViewModel::groupingMode() const
 {
     return d->groupingMode;
diff --git a/app/views/tableview/tableview_model.h b/app/views/tableview/tableview_model.h
index e9cd871..b67d444 100644
--- a/app/views/tableview/tableview_model.h
+++ b/app/views/tableview/tableview_model.h
@@ -113,8 +113,6 @@ public:
     ImageInfo imageInfo(const QModelIndex& index) const;
     QModelIndex itemIndex(Item* const item) const;
     QList<ImageInfo> allImageInfo() const;
-    QList<QUrl> urlsFromIndexes(const QModelIndexList& indexList) const;
-    QList<QUrl> selectedUrls() const;
     QModelIndex deepRowIndex(const int rowNumber) const;
     int indexToDeepRowNumber(const QModelIndex& index) const;
     int deepRowCount() const;
diff --git a/libs/database/item/imageinfolist.cpp b/libs/database/item/imageinfolist.cpp
index 9c6c671..caef4ca 100644
--- a/libs/database/item/imageinfolist.cpp
+++ b/libs/database/item/imageinfolist.cpp
@@ -50,6 +50,19 @@ QList<qlonglong> ImageInfoList::toImageIdList() const
     return idList;
 }
 
+QList<QUrl> ImageInfoList::toImageUrlList() const
+{
+    QList<QUrl> urlList;
+
+    foreach(const ImageInfo& info, *this)
+    {
+        urlList << info.fileUrl();
+    }
+
+    return urlList;
+}
+
+
 bool ImageInfoList::namefileLessThan(const ImageInfo &d1, const ImageInfo &d2)
 {
     return d1.name().toLower() < d2.name().toLower(); // sort by name
diff --git a/libs/database/item/imageinfolist.h b/libs/database/item/imageinfolist.h
index c2c09d0..8e7bc24 100644
--- a/libs/database/item/imageinfolist.h
+++ b/libs/database/item/imageinfolist.h
@@ -55,7 +55,8 @@ public:
     {
     }
 
-    QList<qlonglong> toImageIdList() const;
+    QList<qlonglong> toImageIdList()  const;
+    QList<QUrl>      toImageUrlList() const;
 
     void loadGroupImageIds() const;
     void loadTagIds() const;
