Index: applications/editors/josm/plugins/undelete/src/org/openstreetmap/josm/plugins/undelete/Undelete.java
===================================================================
--- applications/editors/josm/plugins/undelete/src/org/openstreetmap/josm/plugins/undelete/Undelete.java	(revision 34874)
+++ applications/editors/josm/plugins/undelete/src/org/openstreetmap/josm/plugins/undelete/Undelete.java	(revision 34875)
@@ -8,8 +8,12 @@
 
 /**
- * Create the undelete plugin.
+ * Undelete action allows to restore one or more deleted objects.
  */
 public class Undelete extends Plugin {
 
+    /**
+     * Create the undelete plugin.
+     * @param info plugin information
+     */
     public Undelete(PluginInformation info) {
         super(info);
Index: applications/editors/josm/plugins/undelete/src/org/openstreetmap/josm/plugins/undelete/UndeleteAction.java
===================================================================
--- applications/editors/josm/plugins/undelete/src/org/openstreetmap/josm/plugins/undelete/UndeleteAction.java	(revision 34874)
+++ applications/editors/josm/plugins/undelete/src/org/openstreetmap/josm/plugins/undelete/UndeleteAction.java	(revision 34875)
@@ -89,4 +89,5 @@
                             // If the object is not deleted we get the real object
                             DownloadPrimitivesTask download = new DownloadPrimitivesTask(layer, Collections.singletonList(pid), true);
+                            download.setZoom(false);
                             download.run();
 
@@ -100,5 +101,5 @@
                                 hPrimitive2 = h.getByVersion(n - idx++);
                             }
-                            if (type.equals(OsmPrimitiveType.NODE)) {
+                            if (type == OsmPrimitiveType.NODE) {
                                 // We get version and user from the latest version,
                                 // coordinates and tags from n-1 version
@@ -111,5 +112,5 @@
 
                                 primitive = node;
-                            } else if (type.equals(OsmPrimitiveType.WAY)) {
+                            } else if (type == OsmPrimitiveType.WAY) {
                                 // We get version and user from the latest version,
                                 // nodes and tags from n-1 version
@@ -174,9 +175,9 @@
                                 restored.add(primitive);
                             } else {
-                              final String msg = OsmPrimitiveType.NODE.equals(type)
+                              final String msg = OsmPrimitiveType.NODE == type
                                   ? tr("Unable to undelete node {0}. Object has likely been redacted", id)
-                                  : OsmPrimitiveType.WAY.equals(type)
+                                  : OsmPrimitiveType.WAY == type
                                   ? tr("Unable to undelete way {0}. Object has likely been redacted", id)
-                                  : OsmPrimitiveType.RELATION.equals(type)
+                                  : OsmPrimitiveType.RELATION == type
                                   ? tr("Unable to undelete relation {0}. Object has likely been redacted", id)
                                   : null;
@@ -185,6 +186,6 @@
                             }
                         }
-                    } catch (Exception t) {
-                        Logging.error(t);
+                    } catch (Exception e) {
+                        Logging.error(e);
                     }
                 }
@@ -196,5 +197,5 @@
                 ((Way) parent).setNodes(nodes);
             }
-            if (!restored.isEmpty()) {
+            if (parent == null && !restored.isEmpty()) {
                 layer.data.setSelected(restored);
                 GuiHelper.runInEDT(() -> AutoScaleAction.autoScale(AutoScaleMode.SELECTION));
@@ -203,4 +204,7 @@
     }
 
+    /**
+     * Create undelete action.
+     */
     public UndeleteAction() {
         super(tr("Undelete object..."), "undelete", tr("Undelete object by id"),
