Skip to content
Browse files

Fix the edit tool preferences so that they fire a change event when the

preference is changes.
  • Loading branch information...
1 parent 4d2ed92 commit cc77acff9f63ae0a07fc761ac66de5313cceb76c @levi-putna levi-putna committed
View
2 ...ctions.udig.tool.edit/src/net/refractions/udig/tools/edit/preferences/PreferenceUtil.java
@@ -184,7 +184,7 @@ public SnapBehaviour getSnapBehaviour() {
}
public void setSnapBehaviour( SnapBehaviour behaviour ) {
- store.putValue(PreferenceConstants.P_SNAP_BEHAVIOUR, behaviour.toString());
+ store.setValue(PreferenceConstants.P_SNAP_BEHAVIOUR, behaviour.toString());
}
/**
View
7 ....tool.edit/src/net/refractions/udig/tools/options/SnappingToolOptionContributionItem.java
@@ -22,6 +22,8 @@
import org.eclipse.jface.action.StatusLineLayoutData;
import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.util.IPropertyChangeListener;
+import org.eclipse.jface.util.PropertyChangeEvent;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Combo;
import org.eclipse.swt.widgets.Composite;
@@ -55,15 +57,16 @@
@Override
protected IPreferenceStore fillFields( Composite parent ) {
+
combo = new Combo(parent, SWT.READ_ONLY);
combo.setItems(lables);
StatusLineLayoutData data = new StatusLineLayoutData();
data.heightHint=SWT.DEFAULT;
data.widthHint=100;
combo.setLayoutData(data);
-
+
addField( PreferenceConstants.P_SNAP_BEHAVIOUR, combo , behaviour);
+
return EditPlugin.getDefault().getPreferenceStore();
}
-
}

0 comments on commit cc77acf

Please sign in to comment.
Something went wrong with that request. Please try again.