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

2 ImageSelector bugs, 1 improvement. #46

Closed
GoogleCodeExporter opened this issue Jun 3, 2015 · 1 comment
Closed

2 ImageSelector bugs, 1 improvement. #46

GoogleCodeExporter opened this issue Jun 3, 2015 · 1 comment

Comments

@GoogleCodeExporter
Copy link

Just found your code library and started to use in my supersync app. Fantastic!

Some quick changes...

#1. 
ImageSelector.java
change:
        private void scrollAndAnimateBy(final int increment) {
        if (this.index == 0 && increment < 0 || this.index == this.items.size() - 1 && increment > 0) {
            return;
        }

to
    private void scrollAndAnimateBy(final int increment) {
        if (increment == 0 || this.index == 0 && increment < 0 || this.index == this.items.size() - 1 && increment > 0) {
            return;
        }


If increment is 0 (and can be) step will be 0, and the animation will run 
forever.




#2 SWTGraphicUtil.createReflectedResizedImage
Resource leak. This one is serious.

Change:
        imgData.alphaData = alphaData;
        return new Image(source.getDevice(), imgData);

        imgData.alphaData = alphaData;
        newImage.dispose(); // BHL Added 2015/04/20 to remove resource leak.
        return new Image(source.getDevice(), imgData);




#3 ISItem.java (feature request) 
Add constructor to allow any image.
    public ISItem(final String title, final Image img)
    {
        setImage(img);
        setText(title);
    }





Original issue reported on code.google.com by bhLowe on 20 Apr 2015 at 9:25

@lcaron
Copy link
Owner

lcaron commented Jul 7, 2015

Issue fixed in V1.0.2, thank to bhLowe !

@lcaron lcaron closed this as completed Jul 7, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants