Skip to content

Commit 654d6e1

Browse files
committed
If map columns window is open, close it then reopen it.
1 parent e08a83c commit 654d6e1

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

Scenes/CustomTooltip.gd

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ func set_floortexture(floorTextureValue):
3939
dataTexture.create_from_image(dataImage, 0)
4040

4141
dataImage.lock()
42-
dataImage.set_pixel(0, 0, Color8(floorTextureValue >> 16 & 255, floorTextureValue >> 8 & 255, floorTextureValue & 255))
42+
dataImage.set_pixel(0, 0, Color8(int(floorTextureValue) >> 16 & 255, int(floorTextureValue) >> 8 & 255, int(floorTextureValue) & 255))
4343
dataImage.unlock()
4444
dataTexture.set_data(dataImage)
4545

Scenes/OpenMap.gd

+7-3
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,6 @@ func open_map(filePath):
9898

9999
# Always begin by clearing map
100100
oCurrentMap.clear_map()
101-
# Close windows that I want closed
102-
oMapSettingsWindow.visible = false
103-
oColumnEditor.visible = false
104101

105102
var map = filePath.get_basename()
106103

@@ -233,6 +230,13 @@ func continue_load(map):
233230
oMessage.quick("Fixed column index 0, re-save your map.")
234231

235232
oDataClm.store_default_data()
233+
234+
oMapSettingsWindow.visible = false
235+
236+
237+
if oColumnEditor.visible == true:
238+
oColumnEditor.visible = false
239+
Utils.popup_centered(oColumnEditor)
236240

237241
func continue_load_openmap(map):
238242
oEditor.mapHasBeenEdited = false

Scenes/UndoStates.gd

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ func attempt_to_save_new_undo_state(): # called by oEditor
4040

4141

4242
func on_undo_state_saved(new_state):
43-
if undo_history.size() >= 2 and are_states_equal(new_state, undo_history[1]):
43+
if undo_history.size() >= 1 and are_states_equal(new_state, undo_history[0]):
4444
oMessage.quick("Didn't add undo state as it is the same as the previous undo-state")
4545
is_saving_state = false
4646
return

0 commit comments

Comments
 (0)