Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Angle Slider: setSelection always raise an java.lang.IllegalArgumentException: null soure #54

Closed
dejawho opened this issue Jan 14, 2016 · 1 comment

Comments

@dejawho
Copy link

dejawho commented Jan 14, 2016

Hi,
AngleSlider has a serious bug in the setSelecition method. When it fire the selectionListeners it create a new Event(), then this event is used to build a selection event. But a selection event need to have in the passed event the filed widget set, otherwise it will trigger the IllegalAegumentSection. The fix is pretty easy and simple:

public void setSelection(final int selection) {
    checkWidget();
    if (selection < 0 || selection > 360) {
        SWT.error(SWT.ERROR_CANNOT_SET_SELECTION);
    }
    this.selection = selection;
    Event e = new Event();
            e.widget = this;
            fireSelectionListeners(e);
    redraw();
}
@lcaron
Copy link
Owner

lcaron commented Nov 5, 2016

Fix in next release

@lcaron lcaron closed this as completed Nov 5, 2016
lcaron added a commit that referenced this issue Nov 5, 2016
java.lang.IllegalArgumentException: null source
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants