Skip to content

Commit

Permalink
Merge pull request apache#4260 from nadment/4258
Browse files Browse the repository at this point in the history
Cannot save web service when editing run configuration apache#4258
  • Loading branch information
hansva authored Aug 30, 2024
2 parents 76f2a45 + 1c38407 commit d7faaff
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,13 @@
import org.apache.hop.workflow.WorkflowMeta;
import org.apache.hop.workflow.config.WorkflowRunConfiguration;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.ModifyListener;
import org.eclipse.swt.layout.FormAttachment;
import org.eclipse.swt.layout.FormData;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Listener;
import org.eclipse.swt.widgets.Text;

/**
Expand Down Expand Up @@ -227,12 +227,13 @@ public void createControl(Composite parent) {
setWidgetsContent();

// Add listener to detect change after loading data
ModifyListener lsMod = e -> setChanged();
wName.addModifyListener(lsMod);
wEnabled.addListener(SWT.Selection, e -> setChanged());
wFilename.addModifyListener(lsMod);
wStatusVars.addModifyListener(lsMod);
wContentVar.addModifyListener(lsMod);
Listener lsMod = e -> setChanged();
wName.addListener(SWT.Modify, lsMod);
wEnabled.addListener(SWT.Selection, lsMod);
wFilename.addListener(SWT.Modify, lsMod);
wRunConfiguration.addListener(SWT.Modify, lsMod);
wStatusVars.addListener(SWT.Modify, lsMod);
wContentVar.addListener(SWT.Modify, lsMod);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Listener;
import org.eclipse.swt.widgets.ToolBar;

/**
Expand Down Expand Up @@ -184,7 +185,7 @@ public MetaSelectionLine(
metadata.image(),
(int) (ConstUi.SMALL_ICON_SIZE * props.getZoomFactor()),
(int) (ConstUi.SMALL_ICON_SIZE * props.getZoomFactor()));
addListener(SWT.Dispose, e -> editImage.dispose());
super.addListener(SWT.Dispose, e -> editImage.dispose());

// Toolbar for default actions
//
Expand Down Expand Up @@ -384,6 +385,11 @@ public void addToConnectionLine(
setLayoutData(fdConnection);
}

@Override
public void addListener(int eventTYpe, Listener listener) {
wCombo.addListener(eventTYpe, listener);
}

public void addModifyListener(ModifyListener lsMod) {
wCombo.addModifyListener(lsMod);
}
Expand Down

0 comments on commit d7faaff

Please sign in to comment.