maforget / ComicRackCE

A Community Edition for the legendary Comic Book Manager ComicRack. ComicRack is back from the dead.
GNU General Public License v2.0
213 stars 20 forks source link

Remember position for script output window #60

Closed SenorSmartyPants closed 3 months ago

SenorSmartyPants commented 3 months ago

Describe the bug I run CR(CE) with the flags -dso -ssc to enable script output and any script debugging I might do. Everytime I move the window CR doesn't remember the new position when I open CR the next time. Please make this window remember position if possible. Thank you

maforget commented 3 months ago

Cheated a little bit, the location/size saving is now driven by the workspace system. So it loads at the default location, but once the Main window is loaded it will move to it's saved location. Might not be the best in regards to programming best practice. But the bonus is that is can now be saved/restored via the workspace system.

SenorSmartyPants commented 3 months ago

Cool. This fixes saving the console window size and location, but now the main window is always maximized. I changed it's location and restarted a few times, it becomes max each time.

maforget commented 3 months ago

That is unrelated, that was another change 659e8f6c582ba7ecc9ff07a87e7ab1008ef902da. I've reverted that change.

I wanted to change the initial status of the Form when starting fresh to be Maximized but I didn't want to mess with people settings. Like having the window suddenly maximized when it was not. So I didn't change the default attribute from Normal, what that does is not save the status when that is the value.

So in your case you set it to normal, and normal was the default so it didn't save it, so always chose the Max initial value. In that case you could never have a Normal window, without modifying the Config.xml to add the window state.

Fix is either to change the default to Maximized or remove the default altogether and always save the status. But both of those would make the window Max if they were set to normal on the first load only. So better that the always Max we had, but haven't figured out a way to prevent that.

SenorSmartyPants commented 3 months ago

Thanks. That's working fine for me now.