Macro edit window default position
Moderators: dorpond, trevor, Azhrei
Forum rules
PLEASE don't post images of your entire desktop, attach entire campaign files when only a single file is needed, or generally act in some other anti-social behavior.
PLEASE don't post images of your entire desktop, attach entire campaign files when only a single file is needed, or generally act in some other anti-social behavior.
- Bone White
- Great Wyrm
- Posts: 1124
- Joined: Tue Aug 23, 2011 11:41 am
- Location: Cornwall, UK
Macro edit window default position
This has been irritating me for the last few days, but I finally figured out how to fix it. My macro edit window was drawing so low down that ok and cancel were drawn behind my taskbar, so I either had to drag the window out every time or use ctrl+enter to submit the changes. I tried re-installing MapTool and all sorts of other things, but what finally fixed it was closing the edit macro window with the X in the top right. This makes MapTool remember the size of the window and the location.
Thought this might be useful for people to search for on the forums to find the answer, or for anyone else having the same problem.
Thought this might be useful for people to search for on the forums to find the answer, or for anyone else having the same problem.
Re: Macro edit window default position
Join the club. I figured this out and posted it 1.5 years ago. But it's good to bump this from time to time. Note that it also works if you close the window by double clicking thumper left corner.
GETTING STARTED WITH MAPTOOLS - TUTORIALS, DOCS, VIDEOS, TOOLS, ETC
DISCORD (the new MT forum!)
My stuff
Excel Tools: Table and Light editors
MT Tools: Bag of Tricks: Tools for Maptool, Dungeon Builder I, Dungeon Builder II,onMouseOverEvent.
Frameworks: Dark Heresy, Rogue Trader, Deathwatch, Black Crusade, Only War, SET Card Game, RoboRally
Wiki: Debugging Tutorial, Speed Up Your Macros, Working With Two CODE Levels, Shortcut Keys, Avoiding Stack Overflow, READ THIS
DISCORD (the new MT forum!)
My stuff
Excel Tools: Table and Light editors
MT Tools: Bag of Tricks: Tools for Maptool, Dungeon Builder I, Dungeon Builder II,onMouseOverEvent.
Frameworks: Dark Heresy, Rogue Trader, Deathwatch, Black Crusade, Only War, SET Card Game, RoboRally
Wiki: Debugging Tutorial, Speed Up Your Macros, Working With Two CODE Levels, Shortcut Keys, Avoiding Stack Overflow, READ THIS
- Bone White
- Great Wyrm
- Posts: 1124
- Joined: Tue Aug 23, 2011 11:41 am
- Location: Cornwall, UK
Re: Macro edit window default position
I did try searching both in forums and using google to site search, oh well.
Re: Macro edit window default position
I know, what on earth will your search string be for this one??!Bone White wrote:I did try searching both in forums and using google to site search, oh well.
GETTING STARTED WITH MAPTOOLS - TUTORIALS, DOCS, VIDEOS, TOOLS, ETC
DISCORD (the new MT forum!)
My stuff
Excel Tools: Table and Light editors
MT Tools: Bag of Tricks: Tools for Maptool, Dungeon Builder I, Dungeon Builder II,onMouseOverEvent.
Frameworks: Dark Heresy, Rogue Trader, Deathwatch, Black Crusade, Only War, SET Card Game, RoboRally
Wiki: Debugging Tutorial, Speed Up Your Macros, Working With Two CODE Levels, Shortcut Keys, Avoiding Stack Overflow, READ THIS
DISCORD (the new MT forum!)
My stuff
Excel Tools: Table and Light editors
MT Tools: Bag of Tricks: Tools for Maptool, Dungeon Builder I, Dungeon Builder II,onMouseOverEvent.
Frameworks: Dark Heresy, Rogue Trader, Deathwatch, Black Crusade, Only War, SET Card Game, RoboRally
Wiki: Debugging Tutorial, Speed Up Your Macros, Working With Two CODE Levels, Shortcut Keys, Avoiding Stack Overflow, READ THIS
- Bone White
- Great Wyrm
- Posts: 1124
- Joined: Tue Aug 23, 2011 11:41 am
- Location: Cornwall, UK
Re: Macro edit window default position
Hopefully two or more of the five words in the title <_<
Re: Macro edit window default position
Sounds like a bug.Bone White wrote:[...] what finally fixed it was closing the edit macro window with the X in the top right. This makes MapTool remember the size of the window and the location.
What is likely happening is that the Java object that represents the dialog (called a JDialog) is being completely destroyed when you submit it and the location is also freed up. But when you close it from the X the dialog is disposed instead and the location is retained. Seems strange though; most Swing components don't work like that. (Although dialogs are different from regular Swing components in quite a few ways.) I'll take a look at the code.
- Bone White
- Great Wyrm
- Posts: 1124
- Joined: Tue Aug 23, 2011 11:41 am
- Location: Cornwall, UK
Re: Macro edit window default position
Note that the same applies to the cancel button Az. We're not asking for a fix because the work around is so simple, but we appreciate your eagerness.
Re: Macro edit window default position
Something strange is going on. The existing code calls both setVisible(false) and dispose() on the dialog when the OK or Cancel buttons are used. By default, the Close button in the titlebar only causes setVisible(false).
So, logically, I should be able to remove the dispose() and get the same behavior, but that doesn't work. The Close button remembers the location of the dialog and the OK and Cancel do not. There's still something else going on. I'll continue to look into this over the next day or two.
So, logically, I should be able to remove the dispose() and get the same behavior, but that doesn't work. The Close button remembers the location of the dialog and the OK and Cancel do not. There's still something else going on. I'll continue to look into this over the next day or two.
Re: Macro edit window default position
The x goes through a different path on the OS window manager than the ok and cancel. That may make the difference.
Re: Macro edit window default position
Ah, very likely. To really check this I'll need to run it on other OSes and see (it will be awhile before I get to that though).
Great catch.
Great catch.
- Xaelvaen
- Dragon
- Posts: 498
- Joined: Wed Aug 31, 2011 9:49 pm
- Location: Somewhere between Heaven and Hell
Re: Macro edit window default position
This same issue/fix works on other frames as well. For the longest time, my custom character sheet frame just would not remember its location. It remembers the size, but never the relative position. However, thanks to reading this post, x-canceling the frame and then saving the campaign worked well. It now remembers its location.
"An arrogant person considers himself perfect. This is the chief harm of arrogance. It interferes with a person's main task in life - becoming a better person." - Leo Tolstoy