This repository was archived by the owner on Oct 4, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +12
-7
lines changed
addins/MacPlatform/Dialogs
core/MonoDevelop.Ide/MonoDevelop.Ide.ProgressMonitoring Expand file tree Collapse file tree 2 files changed +12
-7
lines changed Original file line number Diff line number Diff line change @@ -240,12 +240,17 @@ public bool Run (AlertDialogData data)
240240 NSApplication . SharedApplication . StopModal ( ) ;
241241 } ) ;
242242
243- // pass parent and not alert so that the Runloop will change
244- // and processing will stop until the sheet is closed.
245- // If we pass alert, then it will run until a second alert is created
246- // which will be shown as a dialog and then the runloop changes and
247- // processing stops
248- NSApplication . SharedApplication . RunModalForWindow ( parent ) ;
243+ if ( IdeApp . Workbench . RootWindow ? . Visible == true ) {
244+ // pass parent and not alert so that the Runloop will change
245+ // and processing will stop until the sheet is closed.
246+ // If we pass alert, then it will run until a second alert is created
247+ // which will be shown as a dialog and then the runloop changes and
248+ // processing stops
249+ NSApplication . SharedApplication . RunModalForWindow ( parent ) ;
250+ } else {
251+ // fixes message dialog below other dialogs issue when no main window is present (at start)
252+ NSApplication . SharedApplication . RunModalForWindow ( alert . Window ) ;
253+ }
249254 }
250255 }
251256
Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ public class MessageDialogProgressMonitor: ProgressMonitor
4040 bool hideWhenDone ;
4141 bool showDetails ;
4242
43- public ProgressDialog ProgressDialog { get => dialog ; }
43+ public ProgressDialog ProgressDialog => dialog ;
4444
4545 public MessageDialogProgressMonitor ( ) : this ( false )
4646 {
You can’t perform that action at this time.
0 commit comments