Selecting "No" or closing the "Are you sure you want to close TreeView?" dialog, closes TreeView

Issue #396 resolved
Robert Leach created an issue

USE CASE: WHAT DO YOU WANT TO DO?

Cancel closing treeview

STEPS TO REPRODUCE AN ISSUE (OR TRIGGER A NEW FEATURE)

  1. Open a fresh instance of treeview
  2. Load the last file
  3. Click TreeView's main window close button
  4. Either close the confirmation window or click the "No" button

CURRENT BEHAVIOR

TreeView quits regardless of selection or action in the confirmation window

EXPECTED BEHAVIOR

If the confirmation window is closed or if the "No" button is clicked, TreeView remains open and the confirmation window goes away. I also think that the button names could be "Cancel" and "Quit" and that the dialog window's close button should be disabled.

DEVELOPERS ONLY SECTION

SUGGESTED CHANGE (Pseudocode optional)

  1. Disable the dialog confirmation window's close button
  2. Change the buttons to "Cancel" and "Quit" (or OS equivalent)
  3. Clicking the No/Cancel button should dismiss the confirmation dialog and keep treeview open
  4. If the dialog close button is not disabled, closing the dialog window should do the same thing as no/cancel.

FILES AFFECTED (where the changes will be implemented) - developers only

unknown

LEVEL OF EFFORT - developers only

minor

COMMENTS

Comments (5)

  1. Robert Leach reporter

    Looks like the exit call is happening in JFrame.class on line 313:

                  case EXIT_ON_CLOSE:
                      // This needs to match the checkExit call in
                      // setDefaultCloseOperation
                    System.exit(0);
    

    Still trying to find a place in the code where this can be prevented.

  2. Log in to comment