Skip to content

Commit 51fcb2e

Browse files
committed
Notify when finished saving
1 parent 5fc2426 commit 51fcb2e

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

Types/FileIO.bmx

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,9 @@ Type FileIO
8585
saveSuccess = SavePixmapPNG(pixmapToSave, filename)
8686
EndIf
8787
If Not saveSuccess Then
88-
Notify("Failed to save file: " + filename)
88+
Notify("Failed to save file: " + filename, True)
89+
Else
90+
Notify("File saved successfully!")
8991
EndIf
9092
EndIf
9193
Return True 'Return something to indicate function finished so workspace can be reverted
@@ -96,6 +98,7 @@ Type FileIO
9698
Method SaveFileAsFrames:Int(pixmapToSave:TPixmap[,], frameCount:Int)
9799
Local filename:String = RequestFile("Save graphic output", Null, True) 'No file extensions here, we add them later manually otherwise exported file name is messed up
98100
If CheckValidExportFileName(filename) Then
101+
Local saveSuccess:Int = True
99102
For Local row:Int = 0 To 3
100103
Local rowName:String 'Name the rows - by default: ArmFG, ArmBG, LegFG, LegBG in this order
101104
Select row
@@ -116,7 +119,6 @@ Type FileIO
116119
leadingZeros = "0"
117120
EndIf
118121

119-
Local saveSuccess:Int = True
120122
If m_SaveAsIndexed Then
121123
Select m_IndexedFileType
122124
Case "png"
@@ -131,11 +133,14 @@ Type FileIO
131133
EndIf
132134

133135
If Not saveSuccess Then
134-
Notify("Failed to save file: " + fullFilename + "~nFurther saving aborted!")
136+
Notify("Failed to save file: " + fullFilename + "~nFurther saving aborted!", True)
135137
Return True
136138
EndIf
137139
Next
138140
Next
141+
If saveSuccess Then
142+
Notify("Files saved successfully!")
143+
EndIf
139144
EndIf
140145
Return True 'Return something to indicate function finished so workspace can be reverted
141146
EndMethod

0 commit comments

Comments
 (0)