Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Frame property temporary=1 is ignored #585

Closed
Merudo opened this issue Aug 19, 2019 · 3 comments
Closed

Frame property temporary=1 is ignored #585

Merudo opened this issue Aug 19, 2019 · 3 comments
Assignees
Labels
bug tested This issue has been QA tested by someone other than the developer.

Comments

@Merudo
Copy link
Member

Merudo commented Aug 19, 2019

Describe the bug
If a frame is opened with temporary=1; maptool still remembers the window size between openings

To Reproduce
Steps to reproduce the behavior:

  1. Use the following macro:

[frame("Frame Test", "width=300; height=500; temporary=1;"): {A test} ]

  1. Resize frame.
  2. Close frame.
  3. Run the macro again. The frame has the same size as before.

Expected behavior
Maptool doesn't remember the size if temporary is set to 1.

MapTool Info

  • Version: 1.5.3
  • Install: New

Desktop (please complete the following information):

  • OS: Windows
  • Version 10
@Phergus Phergus added the bug label Aug 19, 2019
Merudo added a commit to Merudo/maptool that referenced this issue Aug 20, 2019
- Fix behavior with temporary=1 when the frame is closed through closeFrame()
- Add variable "temporary" to getFrameProperties()
- Does not fix behavior for closing by clicking on the close button - I don't know how to setup the WindowListener properly
- Partially fix RPTools#585
@Merudo
Copy link
Member Author

Merudo commented Aug 20, 2019

I don't remember how to add the WindowListener to clear up the frame properties after clicking the "Close" button. Adding the following to the constructor did not work:

   addWindowListener(
        new WindowAdapter() {
          @Override
          public void windowClosing(WindowEvent e) {
            closeRequest();
          }
        });

EDIT I think addDockableFrameListener() may need to be used.

Merudo added a commit to Merudo/maptool that referenced this issue Aug 20, 2019
- Add addDockableFrameListener to remove the frame after clicking the close button when temporary=1
- Fix RPTools#585
@Merudo
Copy link
Member Author

Merudo commented Aug 20, 2019

Figured it out. PR #596 fix it fully.

@Phergus Phergus added the tested This issue has been QA tested by someone other than the developer. label Aug 20, 2019
@Phergus
Copy link
Contributor

Phergus commented Aug 20, 2019

Tested against 1.5.3 and 1.5.4 develop branch. Working as expected now.

@Phergus Phergus closed this as completed Aug 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug tested This issue has been QA tested by someone other than the developer.
Projects
None yet
Development

No branches or pull requests

2 participants