mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 12:52:44 +00:00 
			
		
		
		
	PixelPaint: Don't crash when cancel is pressed when saving a file
Previously, we were attempting to add an empty string to the most recently open files list when no file was saved.
This commit is contained in:
		
							parent
							
								
									ecf41e13ad
								
							
						
					
					
						commit
						ad62e433f0
					
				
					 3 changed files with 9 additions and 2 deletions
				
			
		|  | @ -763,6 +763,8 @@ void ImageEditor::save_project() | |||
|         return; | ||||
|     } | ||||
|     set_unmodified(); | ||||
|     if (on_file_saved) | ||||
|         on_file_saved(path()); | ||||
| } | ||||
| 
 | ||||
| void ImageEditor::save_project_as() | ||||
|  | @ -779,6 +781,8 @@ void ImageEditor::save_project_as() | |||
|     set_path(file.filename()); | ||||
|     set_loaded_from_image(false); | ||||
|     set_unmodified(); | ||||
|     if (on_file_saved) | ||||
|         on_file_saved(path()); | ||||
| } | ||||
| 
 | ||||
| ErrorOr<void> ImageEditor::save_project_to_file(NonnullOwnPtr<Core::File> file) const | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Tim Ledbetter
						Tim Ledbetter