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

Add workaround for layout persistance issues with macro frames #2682

Merged
merged 1 commit into from
May 27, 2021

Conversation

Irarara
Copy link
Contributor

@Irarara Irarara commented May 27, 2021

Fixes #2485. As detailed in the discussion around the issue, the layout information for frames that are not added to the DockingManager before layout is loaded is not retained. This works around that by saving the names of macro frames to a file (frames.dat, just a NULL delimited list of the names) when Maptool exits and then, when launching, using those names to generate placeholder frames before the layout is loaded so that the layout information is retained. Really, I'd consider this more of a "temporary" workaround to be removed if the issue is ever actually addressed within the library.

In my testing, it seems to do the trick, layout seems to restore the same as you'd expect pre-1.8, and I also haven't observed any issue with the encoding of the frame names. I did once observe frames opening incorrectly (they opened docked somewhere I know I hadn't put them, and when opening them in 1.7 they were in the right spot), but I haven't been able to reproduce this so it may have just been due to something I was doing at the time messing with things. Also of note, if the frame is floating its position is not restored, but this is also the case for macro frames in 1.7.


This change is Reviewable

Copy link
Contributor

@Phergus Phergus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewed 2 of 2 files at r1.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @Irarara)

@Phergus Phergus merged commit d43d4d0 into RPTools:develop May 27, 2021
@Irarara Irarara deleted the frame-layout branch June 8, 2021 13:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Macro-generated frames do not remember their previous position
2 participants