From f6846425fddacd3f5ef965842bac9fc2c1eefad2 Mon Sep 17 00:00:00 2001
From: Gautier Pelloux-Prayer <gautier+git@damsy.net>
Date: Wed, 5 Apr 2017 20:16:24 +0200
Subject: [PATCH] fix 2

---
 .../josm/plugins/utilsplugin2/selection/SelectAllInsideAction.java      | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection/SelectAllInsideAction.java b/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection/SelectAllInsideAction.java
index 006e5f3fc..f023f6a97 100644
--- a/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection/SelectAllInsideAction.java
+++ b/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection/SelectAllInsideAction.java
@@ -15,6 +15,7 @@ import org.openstreetmap.josm.data.osm.DataSet;
 import org.openstreetmap.josm.data.osm.OsmPrimitive;
 import org.openstreetmap.josm.gui.Notification;
 import org.openstreetmap.josm.tools.Shortcut;
+import org.openstreetmap.josm.tools.SubclassFilteredCollection;
 
 /**
  * Extends current selection by selecting nodes on all touched ways
@@ -35,6 +36,7 @@ public class SelectAllInsideAction extends JosmAction {
 
         if (!insideSelected.isEmpty()) {
             ds.addSelected(insideSelected);
+            ds.setSelected(new SubclassFilteredCollection<>(ds.getSelected(), OsmPrimitive::isSelectable));
         } else {
             new Notification(
                     tr("Nothing found. Please select some closed ways or multipolygons to find all primitives inside them!"))
-- 
2.11.0

