[Extension] Dialog Cascader for Ruby extension dialogs
v 1.0.0
Purpose: Brings together extension dialogs scattered on multiple screens or possibly lost offscreen. May be a benefit to users with notebook docks or who move their machine between locations with differing display setups.
Will not work on native web-based dialogs such as 3D Warehouse, Extension Manager, etc. (These windows are hidden from the API.)
NOTE: SketchUp 2024 hasmay have had some fixes that can natively detect lost dialogs and move them back onto an active display. This extension is meant for older versions that do not have this fix or possibly as a complement for when the native fix might fail.
Localized for SketchUp supported languages (and nl & uk.)
Adds a menu item to the Window menu.
Provides a toolbar with a button:
single-click: cascades any open Ruby dialogs
double-click: shows About dialog
Tested on MS Windows platform. Version 2024, 2023, 2022, 2021, & 2017.
I tried to write this so it might possibly even load under Ruby 1.8 for versions prior to SU2014.
But no guarantees for such old versions. (I do not have a machine ready that can run these old versions and I’m not really interested in trying to test for them.)
We get support requests about this issue multiple times per week - I think it is still an issue on SU2024. I will be pointing my users towards this useful utility.
What exactly did they ‘fix’ on SU2024 because I have had reports of this still happening.
The release notes bullet item(s) were rather vague. Some of the dialog positioning fixes I think were treated as development regressions so are not listed in the public release notes. The item stated:
Fixed an issue where UI::HtmlDialog can be set off screen and disappear.
What I myself noticed was that the native dialog windows (incl. web-based) seemed to move back onscreen quite well.
I said this in the question thread you started. In that thread, Josh admitted vaguely “work was done in that area”.
But then, what about UI::WebDialog windows? Dynamic Components and its Generate Report still use these class window interfaces. Also many commonly used extensions still have not migrated to the newer UI::HtmlDialog class windows.
Anyway, it was the complaints by @medeek and yourself that prompted me to cobble up this extension, especially for older SketchUp versions that would not be receiving any native fixes.
I myself also needed it, as in testing I’ve had to switch the main (primary) display back and forth several times. (This confuses SketchUp especially when the dialog window position coordinates are negative values.)
I also tested it on SU2017 which used to keep window metric settings in the Windows registry. It is not possible to store a negative DWORD value in the registry. So, I set the positions to enormous values way outside the virtual desktop bounds. SU2017 natively moved the dialog windows back onto the screen, but strangely did not seem to update the registry with the new values.
The takeaway could be that SU2017 on MS Windows and earlier may not have the disappearing window problems that necessitate this extension. (shrug)
It is a simple idea really, but not an original one by me.
Right-click your Windows 10 taskbar and you’ll notice there is a Cascade Windows command.*
And most Multiple Document Interface applications have a document window cascade command.
* Apparently removed in Win 11 in favor of the Snap Layouts widget.
SketchUp on the Mac may itself have one on its Window menu. Ie …
Sketchup.send_action('arrangeInFront:')
… may be the “Macish” send action for it. But this may only cascade the document (model) windows.
Now there may be a caveat. An extension dialog could within its JavaScript periodically test its own position and change it via a call to the Ruby side. So, an extension could possibly become confused as to where it should be and might fight against the cascade positioning.
Need to bump this thread. I’ve had two people in the last 3 days contact me about losing their dialog boxes on SU 2024. Is any one else seeing a lot of this lately?
It seems like SU 2024 is having this issue more than previous versions. Dan your Dialog Cascader is a lifesaver.
Yeah, I’m still seeing this issue lots (multiple times per week). I’m sending my customers to this thread to fix the problem. Thanks again Dan…but what is the status from the SketchUp team about this issue?
This issue is really frustrating for extension users and reflects quite badly on us developers even though it is not our fault. We need this fixed
For those of you who don’t know me, I’m Ted Vitale, I’m the new Product Owner for SketchUp Desktop (as of January of this year). I’m a longtime SketchUp user and have been known to lurk around the forums from time to time in the past. I know how you feel, I’ve been in your shoes in the past, waiting for a fix to a bug while I’m pulling my hair out because of it.
With that said, I wanted to make a note about what’s going on with this bug and where we are with a fix for it, as it’s particularly frustrating bug if it effects you, and I too hate it.
So, where did this bug originate? Essentially, all of SketchUp 2024’s UI is built on a framework called Qt and it unfortunately had a pretty awful collection of bugs that relate to High DPI screen scaling and Multi Monitor setups. It’s essentially the reason you’re seeing what you’re seeing in 2024 and not 2023 or earlier. I’m not trying to play pass-the-buck here, the team and I genuinely did our best to address it for the current release, but the reality is, we were hamstrung until the Qt update that fixed the problem got released. That Qt update has since been released, and it’s been tested on our end as a solution for these specific issues, however, its a bigger upgrade than what would typically be considered for releasing in something like a patch. So unfortunately, it will have to wait for larger release, one with ample testing to vet that its stable and doesn’t cause some other worse issue. As always, I unfortunately cant speak to a specific release date, all I can say is it will be fixed in a future release.
I hope that helps better clarify the situation. Feel free to message me here directly with any more specific questions. I’m happy to answer as best I can.
Please bump this thread, I need to send it to my customers at least two or three times a week. What is even more annoying though is they think my extensions are specifically causing the problem and then proceed to bombard me with this issue when I have no control over it. Fortunately Dan has found a work around or solution.
SketchUp, please release an update that can fix this problem as soon as possible.
If the user cannot find the window because it was opened on a different - non-existent screen, on the second time he try to open, it will not open (because it is already there somewhere), but brings it to the center of the active model window.
“The #center method is used to center the HtmlDialog relative to the active model window. If there is no active model window, this function doesn’t do anything.”