Uploaded image for project: 'ZK'
  1. ZK
  2. ZK-1568

Visibility of window is always set to true when changing mode

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Won't Fix
    • Affects Version/s: 6.5.1
    • Fix Version/s: None
    • Component/s: Components
    • Labels:

      Description

      A zul window like this:

      <window id="ranks" visible="false" mode="overlapped" width="640px" renderdefer="100" />
      

      is rendered visible anyway.

      If it is written like this:

      <window id="ranks"  mode="overlapped" visible="false" width="640px" renderdefer="100" />
      

      it renders correct (not visible).

      The method "setNonModalMode(int mode)" of the 'window' class should check the current visibility of the window & not just set the visibility to true:

      /* Set non-modal mode. */
      private void setNonModalMode(int mode) {
      	if (_mode != mode) {
      		if (_mode == MODAL) leaveModal(mode);
      		else {
      			_mode = mode;
      			smartUpdate("mode", modeToString(_mode));
      		}
      	}
      	setVisible(true);  // should check for visibility setting first
      }
      

        Attachments

          Activity

            People

            Assignee:
            vincentjian vincentjian
            Reporter:
            zkh zkh
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: