File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ export class ProjectWindows {
2121 lasterrors : WorkerError [ ] ;
2222 undofiles : string [ ] ;
2323 redofiles : string [ ] ;
24+ alerting : boolean ;
2425
2526 constructor ( containerdiv : HTMLElement , project : CodeProject ) {
2627 this . containerdiv = containerdiv ;
@@ -145,7 +146,7 @@ export class ProjectWindows {
145146 this . redofiles . push ( fileid ) ;
146147 this . refresh ( false ) ;
147148 } else {
148- bootbox . alert ( "No more steps to undo." ) ;
149+ this . showAlert ( "No more steps to undo." ) ;
149150 }
150151 }
151152
@@ -157,10 +158,16 @@ export class ProjectWindows {
157158 this . undofiles . push ( fileid ) ;
158159 this . refresh ( false ) ;
159160 } else {
160- bootbox . alert ( "No more steps to redo." ) ;
161+ this . showAlert ( "No more steps to redo." ) ;
161162 }
162163 }
163164
165+ showAlert ( msg : string ) {
166+ if ( this . alerting ) return ;
167+ this . alerting = true ;
168+ bootbox . alert ( msg , ( ) => { this . alerting = false ; } ) ;
169+ }
170+
164171 updateAllOpenWindows ( store ) {
165172 for ( var fileid in this . id2window ) {
166173 var wnd = this . id2window [ fileid ] ;
You can’t perform that action at this time.
0 commit comments