Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    14.1 Button Icon URL

    Hi,

    We're upgrading our application to SmartGWT 14.1d-20250226 and we've noticed a change in behaviour for Button Icon URL, the image folder seems to appended an extra time.
    Tracking down the changes in the code, we've noticed this change in ISC_Foundation.js:
    13.0:
    Code:
    isc.A.setIcon = function isc_Button_setIcon(_1) {
            var _2 = this.icon != null;
            this.icon = _1;
            if (this.isDrawn()) {
                var _3 = this.$5f()
                  , _4 = this.$1889();
                if (_2 && (_1 != null) && this.$195i(this.$116h, _3, _4)) {
                    this.setImage(this.$116h, _3, null, _4)
                } else {
                    this.redraw()
                }
            }
        }
    14.1:
    Code:
    isc.A.setIcon = function isc_Button_setIcon(_1) {
            var _2 = this.icon != null;
            this.icon = _1;
            if (this.isDrawn()) {
                var _3 = this.$5f()
                  , _4 = this.$1889();
                if (_2 && (_1 != null) && this.$195i(this.$116h, _3, _4)) {
                    this.setImage(this.$116h, _3, this.skinImgDir, _4)
                } else {
                    this.redraw()
                }
            }
        }
    Namely passing this.skinImgDir instead of null to setImage.
    This can be reproduced by setting the icon of a ToolStripButton after the button is drawn:
    Code:
    ToolStripButton print = new ToolStripButton("Print");
    ToolStripButton highlight = new ToolStripButton("Highlight");
    highlight.addClickHandler(event -> print.setIcon("logo.jpg"));
    Is this change intentional ?
    Thanks for your response.

    #2
    Thanks for the report - the issue has been fixed for tomorrow's builds, dated March 9 and later.

    Comment


      #3
      I can confirm this is fixed in the latest nightly. Thanks for your help.

      Comment

      Working...
      X