Add a workaround for mapper creation breaking getMainWindowSize()#2945
Add a workaround for mapper creation breaking getMainWindowSize()#2945vadi2 merged 4 commits intoMudlet:developmentfrom
Conversation
|
Hey there! Thanks for helping Mudlet improve. 🌟 Test versionsYou can directly test the changes here:
No need to install anything - just unzip and run. |
|
Tested with test code from bug 2023 and also with both new and old versions of GUIframe. Can confirm that while in certain situations there is visual evidence of the bug, it fixes itself within moments and the process of using the mapper in GUIframe is no longer a delicate process - it can all be done on startup without any need to use timers or events. |
|
Hm, for me it was fixed normally, when I run the code: print('Before draw: ' .. tostring(getMainWindowSize()))
createMapper(0,0,500,500)
print('After draw: ' .. tostring(getMainWindowSize()))The values are all correct: |
|
Can you describe how to reproduce the problem you're seeing now? |
This reverts commit 0578c61.
|
Is this a reason why Midnight Sun always starts with a shrunk GUI? If so, reproducing is easy, just login. |
|
Yep, this fixes that GUI too in my testing. Can you confirm? |
keneanung
left a comment
There was a problem hiding this comment.
Many of the changes here look as if they don't belong here.
|
I've fixed the diff. This is good for review. |
…dlet#2945) * Add a workaround for mapper creation breaking getMainWindowSize() * Revert "Fix errors when creating new triggers (Mudlet#2868)" This reverts commit 0578c61. * Fix typo
* Initial commit. Adds ctrl+tab shortcut and logic for moving from pane to pane in the trigger editor. * Shortcut works without menu action. Forward tabbing logic seems to be right. Just missing reverse shortcut and logic. * Added CTRL+SHIFT+Tab shortcut to tab through sections in reverse order. * Removed unnecessary debug code. * Factor out drawing exits in the map into a separate method (#2941) * WIP * Const the variables that we can * Format * Reorganize windows sdk (#2958) * Move declaration of install functions This allows us to use them singularly in a different context. * Use our own edbee with updated QsLog (#2914) Intention is to send all improvements upstream but not be delayed by them getting merged. * Fix userwindows not going away on profile close (#2959) * Use correct URL to download the coverity software * Don't show SSL certificate info until we have one in Profile Preferences (#2953) * Don't show SSL certificate info until we have one & streamline UI * Remove colorroles * Add a workaround for mapper creation breaking getMainWindowSize() (#2945) * Add a workaround for mapper creation breaking getMainWindowSize() * Revert "Fix errors when creating new triggers (#2868)" This reverts commit 0578c61. * Fix typo * Don't include TLS code code when it's not available (#2965) * Raise minimum to Qt 5.11 (#2944) * Raise minimum to Qt 5.11 * Update Travis minimum Qt build * Remove < Qt 5.11 workarounds (#2969) * Replace a couple of cases of std::tie with auto (#2967) * Replace a couple of cases of std::tie with auto * A few more * Fix Coverity TTimer mRepeating initialiser warning (#2972) * Fix updateDialog uninitialised in constructor (#2973) * Fix nullptr warning around curVar (#2974) * Fix a possible nullptr dereference if the room wasn't found for some reason (#2975) * getRoom() will return nullptr if the room id is negative (#2976) * Add autocomplete toggle (#2679) * Update tooltip, more than IRE now provide maps (#2668) * Add autocomplete toggle to profile * Update to a version of edbee with autocomplete toggle * Wire in the autocomplete toggle * Use correct host variable * Add missing toggle call * Formatting changes up simplification of some code. * Added closing bracket that I must have accidentally deleted while resolving conflicts.
Brief overview of PR changes/additions
Somehow
getMainWindowSize()- only on Windows, if right after the mapper creation (same script or profile load), and only for the first time - would report incorrect sizes.This is because
mpRightToolBar,mpTopToolBar, andmpLeftToolBarwhich hold the easy buttons somehow themselves got sizes right when we callmpMapper->show();- super strange, but an event filter verified that is the case - and then shrunk back down immediately.No clue why they get a size, but this workaround does the job.
Motivation for adding to Mudlet
Important bugfix for an annoying issue.
Other info (issues closed, discussion etc)
Fix #2076, fix #2023.