mirror of
				https://github.com/arduino/arduino-ide.git
				synced 2025-10-31 05:58:31 +00:00 
			
		
		
		
	Made the file dialogs modal.
Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
This commit is contained in:
		| @@ -50,7 +50,7 @@ export class SaveAsSketch extends SketchContribution { | ||||
|   /** | ||||
|    * Resolves `true` if the sketch was successfully saved as something. | ||||
|    */ | ||||
|   async saveAs( | ||||
|   private async saveAs( | ||||
|     { | ||||
|       execOnlyIfTemp, | ||||
|       openAfterMove, | ||||
| @@ -82,13 +82,16 @@ export class SaveAsSketch extends SketchContribution { | ||||
|         : sketch.name | ||||
|     ); | ||||
|     const defaultPath = await this.fileService.fsPath(defaultUri); | ||||
|     const { filePath, canceled } = await remote.dialog.showSaveDialog({ | ||||
|       title: nls.localize( | ||||
|         'arduino/sketch/saveFolderAs', | ||||
|         'Save sketch folder as...' | ||||
|       ), | ||||
|       defaultPath, | ||||
|     }); | ||||
|     const { filePath, canceled } = await remote.dialog.showSaveDialog( | ||||
|       remote.getCurrentWindow(), | ||||
|       { | ||||
|         title: nls.localize( | ||||
|           'arduino/sketch/saveFolderAs', | ||||
|           'Save sketch folder as...' | ||||
|         ), | ||||
|         defaultPath, | ||||
|       } | ||||
|     ); | ||||
|     if (!filePath || canceled) { | ||||
|       return false; | ||||
|     } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Akos Kitta
					Akos Kitta