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

Visibility of window is always set to true when changing mode

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: Normal Normal
    • None
    • 6.5.1
    • Components

      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
      }
      

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

              Created:
              Updated:
              Resolved: