This is an automated email from the ASF dual-hosted git repository.
hansva pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hop.git
The following commit(s) were added to refs/heads/master by this push:
new f0f447d615 Delete a hop with one click #3130
new e1b6e34077 Merge pull request #3134 from nadment/3130
f0f447d615 is described below
commit f0f447d615294ae469911bcfb518f9f68bd99d35
Author: Nicolas Adment <[email protected]>
AuthorDate: Wed Aug 2 21:45:33 2023 +0200
Delete a hop with one click #3130
---
.../modules/ROOT/pages/hop-gui/shortcuts.adoc | 21 +++++++++++----------
.../hopgui/file/pipeline/HopGuiPipelineGraph.java | 10 ++++++++--
.../hopgui/file/workflow/HopGuiWorkflowGraph.java | 13 ++++++++++---
3 files changed, 29 insertions(+), 15 deletions(-)
diff --git a/docs/hop-user-manual/modules/ROOT/pages/hop-gui/shortcuts.adoc
b/docs/hop-user-manual/modules/ROOT/pages/hop-gui/shortcuts.adoc
index de1a1557d1..bf21f6b9e2 100644
--- a/docs/hop-user-manual/modules/ROOT/pages/hop-gui/shortcuts.adoc
+++ b/docs/hop-user-manual/modules/ROOT/pages/hop-gui/shortcuts.adoc
@@ -33,7 +33,7 @@ Most of the times you can replace ctrl with cmd.
|Shortcut|Action
|Ctr + n |Create a new work item
|Ctrl + o |Open a work item
-|Ctr + s |Save a work item
+|Ctrl + s |Save a work item
|Ctrl + Shift + F5|Open the Metadata Explorer Menu
|Ctrl + Space|Opens the variables popup (**NOTE**: only environment variables
and variables with the JVM scope are shown here. Variables that are created in
pipeline or workflow with a parent, grant parent or root workflow job need to
be entered manually))
|Ctrl + w |Close a work item
@@ -67,8 +67,9 @@ Most of the times you can replace ctrl with cmd.
|Ctrl + =|Zoom In on your canvas
|Ctrl + -|Zoom out on your canvas
|Ctrl + 0|Reset the zoom percentage to 100%
-|Ctrl + click|On hops to quickly enable/disable
-|Ctr-Shift-Click|Use this shortcut on workflow actions and pipeline transforms
that use another workflow or pipeline to open.
+|Ctrl + Click|On hops to quickly enable/disable
+|Ctrl + Shift + Click|On hops to quickly delete it
+|Ctrl + Shift + Click|Use this shortcut on workflow actions and pipeline
transforms that use another workflow or pipeline to open.
|mouse over + z|Hover over a workflow action or pipeline transform that uses
another workflow or pipeline to open (similar to option above)
|mouse over transform + space|Opens the outgoing fields
|===
@@ -78,13 +79,13 @@ Most of the times you can replace ctrl with cmd.
[width="85%",cols="30%, 70%",options="header"]
|===
|Shortcut|Action
-|CTRL + Shift + ↑ | Switch one perspective up
-|CTRL + Shift + ↓ |Switch one perspective down
-|CTRL + Shift + d |Open the Data Orchestration Perspective
-|CTRL + Shift + i |Open the Execution Information Perspective
-|CTRL + Shift + m |Open the Metadata Perspective
-|CTRL + Shift + e |Open the File Explorer Perspective
-|CTRL + f |Open the Search Perspective
+|Ctrl + Shift + ↑ | Switch one perspective up
+|Ctrl + Shift + ↓ |Switch one perspective down
+|Ctrl + Shift + d |Open the Data Orchestration Perspective
+|Ctrl + Shift + i |Open the Execution Information Perspective
+|Ctrl + Shift + m |Open the Metadata Perspective
+|Ctrl + Shift + e |Open the File Explorer Perspective
+|Ctrl + f |Open the Search Perspective
|none|Open the Plugin Perspective
|none|Open the Neo4j Perspective
|===
diff --git
a/ui/src/main/java/org/apache/hop/ui/hopgui/file/pipeline/HopGuiPipelineGraph.java
b/ui/src/main/java/org/apache/hop/ui/hopgui/file/pipeline/HopGuiPipelineGraph.java
index f956c11275..3468483ed4 100644
---
a/ui/src/main/java/org/apache/hop/ui/hopgui/file/pipeline/HopGuiPipelineGraph.java
+++
b/ui/src/main/java/org/apache/hop/ui/hopgui/file/pipeline/HopGuiPipelineGraph.java
@@ -780,13 +780,19 @@ public class HopGuiPipelineGraph extends
HopGuiAbstractGraph
break;
}
} else {
- // hop links between steps are found searching by (x,y) coordinates.
+ // hop links between transforms are found searching by (x,y) coordinates.
PipelineHopMeta hop = findPipelineHop(real.x, real.y);
if (hop != null) {
+ // Delete hop with on click
+ if (e.button == 1 && shift && control) {
+ // Delete the hop
+ pipelineHopDelegate.delHop(pipelineMeta, hop);
+ updateGui();
+ }
// User held control and clicked a hop between steps - We want to flip
the active state of
// the hop.
//
- if (e.button == 2 || (e.button == 1 && control)) {
+ else if (e.button == 2 || (e.button == 1 && control)) {
hop.setEnabled(!hop.isEnabled());
updateGui();
} else {
diff --git
a/ui/src/main/java/org/apache/hop/ui/hopgui/file/workflow/HopGuiWorkflowGraph.java
b/ui/src/main/java/org/apache/hop/ui/hopgui/file/workflow/HopGuiWorkflowGraph.java
index 73eecc0c16..b7b1f40d00 100644
---
a/ui/src/main/java/org/apache/hop/ui/hopgui/file/workflow/HopGuiWorkflowGraph.java
+++
b/ui/src/main/java/org/apache/hop/ui/hopgui/file/workflow/HopGuiWorkflowGraph.java
@@ -622,13 +622,20 @@ public class HopGuiWorkflowGraph extends
HopGuiAbstractGraph
} else {
WorkflowHopMeta hop = findWorkflowHop(real.x, real.y);
if (hop != null) {
- // User held control and clicked a hop between steps - We want to
flip the active state of
+ // Delete hop with on click
+ if (e.button == 1 && shift && control) {
+ // Delete the hop
+ workflowHopDelegate.delHop(workflowMeta, hop);
+ updateGui();
+ }
+ // User held control and clicked a hop between actions - We want to
flip the active state of
// the hop.
//
- if (e.button == 2 || (e.button == 1 && control)) {
+ else if (e.button == 2 || (e.button == 1 && control)) {
hop.setEnabled(!hop.isEnabled());
updateGui();
- } else {
+ }
+ else {
// A hop: show the hop context menu in the mouseUp() listener
//
clickedWorkflowHop = hop;