This is an automated email from the ASF dual-hosted git repository.
hansva pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/hop.git
The following commit(s) were added to refs/heads/main by this push:
new 4cbe353425 Fix #5969 "Copy" method not reset after removing a hop
(#6127)
4cbe353425 is described below
commit 4cbe35342580552947b7b1b50d996b8bf1db701e
Author: Sergio Ramazzina <[email protected]>
AuthorDate: Sun Dec 7 13:29:52 2025 +0100
Fix #5969 "Copy" method not reset after removing a hop (#6127)
---
.../pipeline/delegates/HopGuiPipelineHopDelegate.java | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git
a/ui/src/main/java/org/apache/hop/ui/hopgui/file/pipeline/delegates/HopGuiPipelineHopDelegate.java
b/ui/src/main/java/org/apache/hop/ui/hopgui/file/pipeline/delegates/HopGuiPipelineHopDelegate.java
index 8c09269150..0cb7c00040 100644
---
a/ui/src/main/java/org/apache/hop/ui/hopgui/file/pipeline/delegates/HopGuiPipelineHopDelegate.java
+++
b/ui/src/main/java/org/apache/hop/ui/hopgui/file/pipeline/delegates/HopGuiPipelineHopDelegate.java
@@ -220,6 +220,7 @@ public class HopGuiPipelineHopDelegate {
pipelineMeta.removePipelineHop(index);
TransformMeta fromTransformMeta = pipelineHopMeta.getFromTransform();
+
TransformMeta beforeFrom = (TransformMeta) fromTransformMeta.clone();
int indexFrom = pipelineMeta.indexOfTransform(fromTransformMeta);
@@ -253,6 +254,22 @@ public class HopGuiPipelineHopDelegate {
}
}
+ // Check remaining hops from 'from' transform after deletion
+ //
+ List<PipelineHopMeta> fromHops =
pipelineMeta.findAllPipelineHopFrom(fromTransformMeta);
+ int fromHopCount = 0;
+ for (PipelineHopMeta fromHop : fromHops) {
+ // Ignore hop for error handling
+ if (fromHop.isEnabled() && !fromHop.isErrorHop()) {
+ fromHopCount++;
+ }
+ }
+
+ // If remaining hops is 1, reset distribute/copy settings in the from
transform
+ if (fromHopCount == 1) {
+ fromTransformMeta.setDistributes(true);
+ }
+
if (transformFromNeedAddUndoChange) {
hopGui.undoDelegate.addUndoChange(
pipelineMeta,