diff --git a/Scenes/CustomTooltip.gd b/Scenes/CustomTooltip.gd index bfd39f6e..5e4eb71f 100644 --- a/Scenes/CustomTooltip.gd +++ b/Scenes/CustomTooltip.gd @@ -39,7 +39,7 @@ func set_floortexture(floorTextureValue): dataTexture.create_from_image(dataImage, 0) dataImage.lock() - dataImage.set_pixel(0, 0, Color8(floorTextureValue >> 16 & 255, floorTextureValue >> 8 & 255, floorTextureValue & 255)) + dataImage.set_pixel(0, 0, Color8(int(floorTextureValue) >> 16 & 255, int(floorTextureValue) >> 8 & 255, int(floorTextureValue) & 255)) dataImage.unlock() dataTexture.set_data(dataImage) diff --git a/Scenes/OpenMap.gd b/Scenes/OpenMap.gd index 48fefe24..6c4d10dd 100644 --- a/Scenes/OpenMap.gd +++ b/Scenes/OpenMap.gd @@ -98,9 +98,6 @@ func open_map(filePath): # Always begin by clearing map oCurrentMap.clear_map() - # Close windows that I want closed - oMapSettingsWindow.visible = false - oColumnEditor.visible = false var map = filePath.get_basename() @@ -233,6 +230,13 @@ func continue_load(map): oMessage.quick("Fixed column index 0, re-save your map.") oDataClm.store_default_data() + + oMapSettingsWindow.visible = false + + + if oColumnEditor.visible == true: + oColumnEditor.visible = false + Utils.popup_centered(oColumnEditor) func continue_load_openmap(map): oEditor.mapHasBeenEdited = false diff --git a/Scenes/UndoStates.gd b/Scenes/UndoStates.gd index df12f511..c3687d39 100644 --- a/Scenes/UndoStates.gd +++ b/Scenes/UndoStates.gd @@ -40,7 +40,7 @@ func attempt_to_save_new_undo_state(): # called by oEditor func on_undo_state_saved(new_state): - if undo_history.size() >= 2 and are_states_equal(new_state, undo_history[1]): + if undo_history.size() >= 1 and are_states_equal(new_state, undo_history[0]): oMessage.quick("Didn't add undo state as it is the same as the previous undo-state") is_saving_state = false return