summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/nautilus-list-base.c2
-rw-r--r--src/nautilus-view-model.c6
-rw-r--r--src/nautilus-view-model.h3
3 files changed, 7 insertions, 4 deletions
diff --git a/src/nautilus-list-base.c b/src/nautilus-list-base.c
index 210b9276b..6a881a399 100644
--- a/src/nautilus-list-base.c
+++ b/src/nautilus-list-base.c
@@ -1110,7 +1110,7 @@ real_remove_file (NautilusFilesView *files_view,
item = nautilus_view_model_get_item_from_file (priv->model, file);
if (item != NULL)
{
- nautilus_view_model_remove_item (priv->model, item);
+ nautilus_view_model_remove_item (priv->model, item, directory);
nautilus_files_view_notify_selection_changed (files_view);
}
}
diff --git a/src/nautilus-view-model.c b/src/nautilus-view-model.c
index 7d6afa82d..2c63e62d7 100644
--- a/src/nautilus-view-model.c
+++ b/src/nautilus-view-model.c
@@ -1,5 +1,6 @@
#include "nautilus-view-model.h"
#include "nautilus-view-item.h"
+#include "nautilus-directory.h"
#include "nautilus-global-preferences.h"
struct _NautilusViewModel
@@ -392,7 +393,8 @@ nautilus_view_model_get_item_from_file (NautilusViewModel *self,
void
nautilus_view_model_remove_item (NautilusViewModel *self,
- NautilusViewItem *item)
+ NautilusViewItem *item,
+ NautilusDirectory *directory)
{
NautilusFile *file;
g_autoptr (NautilusFile) parent = NULL;
@@ -400,7 +402,7 @@ nautilus_view_model_remove_item (NautilusViewModel *self,
guint i;
file = nautilus_view_item_get_file (item);
- parent = nautilus_file_get_parent (file);
+ parent = nautilus_directory_get_corresponding_file (directory);
dir_store = get_directory_store (self, parent);
if (g_list_store_find (dir_store, item, &i))
{
diff --git a/src/nautilus-view-model.h b/src/nautilus-view-model.h
index 5f613ca72..718412652 100644
--- a/src/nautilus-view-model.h
+++ b/src/nautilus-view-model.h
@@ -22,7 +22,8 @@ GQueue * nautilus_view_model_get_items_from_files (NautilusViewModel *self,
GQueue *files);
/* Don't use inside a loop, use nautilus_view_model_remove_all_items instead. */
void nautilus_view_model_remove_item (NautilusViewModel *self,
- NautilusViewItem *item);
+ NautilusViewItem *item,
+ NautilusDirectory *directory);
void nautilus_view_model_remove_all_items (NautilusViewModel *self);
/* Don't use inside a loop, use nautilus_view_model_add_items instead. */
void nautilus_view_model_add_item (NautilusViewModel *self,