Skip to content

Commit 9112750

Browse files
committed
Fix save_settings spam in Preferences and Instruments
1 parent ce314e7 commit 9112750

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

scripts/draw_window_instruments/draw_window_instruments.gml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ function draw_window_instruments() {
7878
show_message("This song contains more than 18 instruments and cannot be saved in version " + string(save_version) + ". The save version will be changed to " + string(nbs_version) + ".")
7979
save_version = nbs_version
8080
}
81+
save_settings()
8182
}
8283
if (mouse_check_button_pressed(mb_left)) {
8384
insedit = -1
@@ -170,7 +171,6 @@ function draw_window_instruments() {
170171
draw_line(x1 + 13 + 194 + 160 + 80, y1 + 87, x1 + 13 + 194 + 160 + 80, y1 + 86 + 20 * a)
171172
draw_scrollbar(insscrollbar, x1 + 14 + 194 + 160 + 80 + 70, y1 + 88, 21, 9, ds_list_size(instrument_list) - 2, 0, 1)
172173
window_set_cursor(curs)
173-
save_settings()
174174

175175

176176
}

scripts/draw_window_preferences/draw_window_preferences.gml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -188,10 +188,11 @@ function draw_window_preferences() {
188188
if (draw_radiobox(x1 + 233 + 32, y1 + 224 + 16, !use_bpm, "Ticks per second (t/s)", "Display song tempos in ticks per second.")) use_bpm = 0
189189
if (draw_radiobox(x1 + 233 + 32, y1 + 244 + 16, use_bpm, "Beats per minute (BPM)", "Display song tempos in beats per minute.")) use_bpm = 1
190190
}
191-
if (draw_button2(x1 + 420, y1 + 478, 72, "OK")) window = 0
192-
window_set_cursor(curs)
193-
save_settings()
194-
191+
if (draw_button2(x1 + 420, y1 + 478, 72, "OK")) {
192+
window = 0
193+
window_set_cursor(curs)
194+
save_settings()
195+
}
195196

196197

197198
}

0 commit comments

Comments
 (0)