From 9e6e3be86ec24a4dbcba621174b35f592ecdb66f Mon Sep 17 00:00:00 2001
From: Piotr Gawron <p.gawron@atcomp.pl>
Date: Tue, 18 Mar 2025 19:01:51 +0100
Subject: [PATCH] don't remove pathways (they cannot be recreated because
 pathway layer is removed)

---
 .../lcsb/mapviewer/commands/CreateHierarchyCommand.java  | 9 ---------
 1 file changed, 9 deletions(-)

diff --git a/model-command/src/main/java/lcsb/mapviewer/commands/CreateHierarchyCommand.java b/model-command/src/main/java/lcsb/mapviewer/commands/CreateHierarchyCommand.java
index 30baa1a22..562785345 100644
--- a/model-command/src/main/java/lcsb/mapviewer/commands/CreateHierarchyCommand.java
+++ b/model-command/src/main/java/lcsb/mapviewer/commands/CreateHierarchyCommand.java
@@ -136,15 +136,6 @@ public class CreateHierarchyCommand extends ModelCommand {
         alias.setTransparencyLevel("");
       }
     }
-    Set<Compartment> toRemove = new HashSet<>();
-    for (final Compartment alias : getModel().getCompartments()) {
-      if (alias instanceof PathwayCompartment) {
-        toRemove.add(alias);
-      }
-    }
-    for (final Compartment alias : toRemove) {
-      getModel().removeElement(alias);
-    }
   }
 
   /**
-- 
GitLab