<html>
    <head>
      <base href="http://fiji.sc/bugzilla/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_REOPENED "
   title="REOPENED - Orphan windows when Quit was cancelled"
   href="http://fiji.sc/bugzilla/show_bug.cgi?id=1022#c6">Comment # 6</a>
              on <a class="bz_bug_link 
          bz_status_REOPENED "
   title="REOPENED - Orphan windows when Quit was cancelled"
   href="http://fiji.sc/bugzilla/show_bug.cgi?id=1022">bug 1022</a>
              from <span class="vcard"><a class="email" href="mailto:wsr@nih.gov" title="Wayne Rasband <wsr@nih.gov>"> <span class="fn">Wayne Rasband</span></a>
</span></b>
        <pre>Macro functions that close image windows (e.g., close(), run("Close"),
run("Close All") and run("Quit")) do not display "save changes" dialogs. Here
is a version of the test macro that displays a dialog before calling
run("Quit"):

  run("Blobs (25K)");
  run("Invert");
  run("Blobs (25K)");
  run("Invert");
  n = 0;
  for (i=1; i<=nImages; i++) {
     selectImage(i);
     if (is("changes")) n++;
  }
  if (n>0) {
     msg = "There are "+n+" images with changes";
     showMessageWithCancel("Quit?", msg);
  }
  run("Quit");
  selectWindow("blobs-1.gif");
  close();</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>