What's new

Bug - Save As dialog should be modal.

sacherjj

Member
Save As dialog should be modal.

It is opening as a different window and blocking action on the main window. This is generally not a problem. However, if you alt+tab to another window that covers the drawing window to get info from a reference drawing to get filename. Then you at tab back to the drawing window, rather than the save window, it is completely blocked. You have to go find the Save As window that is blocking the main part window.

Typically, with Windows development, you can just flag a window a modal and it stays on top of its parent. It looks like in this case it is blocking all Alibre windows. So it should pop on top with selecting any of them.

Alibre Design Pro 27, looking where build info would be. Too new to know if you issue patch released.
 
Last edited:

stepalibre

Alibre Super User
It looks like in this case it is blocking all Alibre windows.
it is completely blocked. You have to go find the Save As window that is blocking the main part window.

I don't think this is a bug, but is instead how Alibre Design is architected. The windows are children that get blocked by any parent window or action. Alibre Design.exe manages all open windows and you are not allowed to interact with other windows when any window is in a modal(dialog) state. This is a behavior that Alibre could change, however MDI style CAD apps all work in a similar way which is what I think Alibre is currently implementing. So Save As is modal, however any existing windows are selectable via alt-tab and user input is blocked.

A workaround I use to allow me to work in a way similar to what you're describing is to open/start multiple Alibre Design.exe processes/instances.

Side note: Alibre automatically handles child windows in addons, which can create problems in custom code. In general you have to call Show() not ShowDialog() in order to not block the UI.
 

sacherjj

Member
I'm fine with the blocking. When you interact with a blocked window, it should move the modal dialog to the top. The problem is being blocked and trying to figure out what where the dialog is that is blocking you. When I'm doing many things at once and paused Alibre in a Save Dialog mode, and get distracted, it can take some time to figure out what is going on when I get back.

If user brings focus to blocked window, locate model window and move to top. That is all that is needed.
 

stepalibre

Alibre Super User
Yes, I agree. This is because of the way Alibre’s MDI system works. I don’t think it’s a true MDI system but a system they‘ve made. I have the same problems you have when working with many windows open. I’m building a custom app with Alibre and I have to do extra checking of windows and force them to be topmost. The issue is those are windows and are treated as windows but they get blocked by dialogs because they are all running from the same process. I’m not sure if this is all by design or if it is a bug.

I’m with you it should be fixed but it may require a new system.
 

sacherjj

Member
There should be a window focus event for each window. So it seems like it should be easy to detect if you are in modal mode and bring forward the blocker. But I've also managed multiple systems where a key design constraint makes some modifications that seems like it would be really easy, harder than expected.
 

stepalibre

Alibre Super User
I think the issue with window events, is that they only apply to that window or child windows created from that window (owners). Other independent open windows aren't affected by other window events.
 

sacherjj

Member
I understand. But something in the window being focused is telling it there is a modal block, as it doesn't react. So there should be a method of telling the system that modal dialog needs elevated. But it all depends on architecture if this can be a simple call back or gets more "fun".
 

stepalibre

Alibre Super User
Most of this happens automatically with forms/windows. You would need to have a command that handles the call and does what you're suggesting before the "Save As" code is called. You are right it is a simple concept but the details are often more complex.

And Save As, Open File and other dialogs are also built-in controls, unless Alibre makes it's own but I'll stop here.
 

stepalibre

Alibre Super User
Here are two examples in my Alibre app that deals directly with your post.

The first clip shows how dialog/windows in this case the Equation Editor is opening below the Alibre viewport/window until I click my app window Alibre is attached to.

1707267398065.gif

The second clip shows how Save As and other dialogs don't block my custom UI. It only blocks Alibre viewport, I can still interact with the ribbon and move the window.

1707267418521.gif

As a result, in my code, I need to handle this modal issue the same issue you're explaining here. I wanted to give an example since this is all code I'm currently working on.
 
Top