Quitting via app menu doesn't preserve window size/location

Issue #154 closed
Robert Leach created an issue

I had thought originally that the saving of the wondow size/location had stopped working all together, but I just realized that if you close the TreeView window to quit, it remembers the window size & position. So it looks like the remembering of window/size & position is broken for only when you quit via the app menu.

Comments (17)

  1. Christopher Keil repo owner

    The OSX app menus are different from the in-app menus (File, View, etc.) and are not handled at all yet. This has to be handled via Apple specific Java classes. They are only available for the OSX JDK and won't compile if used on Windows or Linux machines. The problem can be solved by reflection but implementation can take a bit of time and so I propose to make this available for the next release (alpha02).

  2. Robert Leach reporter

    Could this be mitigated by catching a command-q shortcut? Or could it be saved when other settings are saved?

  3. Robert Leach reporter

    I just realized that this does not have to be saved upon close/quit @TreeView3Dev. We could just save the settings when a window resize occurs! We wouldn't then need to much with OS-specific tricks. What do you think? Should be an easy fix, right?

  4. Robert Leach reporter

    Agreed. I'll see if I can get to this after fixing up/cleaning the zoom code and the file load/header issue. Feel free to address it in the interim if you have the time and desire.

  5. Robert Leach reporter

    I realized after I finished that I implemented the saving of settings using the resize of the jpanel that the data is displayed in instead of a resize of the ViewFrame. I should fix that at some point. Regardless, it works. I also implemented the saving of settings also when the window is moved, though note that it you move an edge of the window off the screen, it doesn't remember that position and shifts the window into full view upon restart.

  6. Robert Leach reporter
    • changed status to open

    This appears to be broken in master again. The changes I had made to save the window location upon move were perhaps edited or reverted...?

  7. Log in to comment