Fix isolevel paint and paint brush tools always allowing chunk creation.

This commit is contained in:
Relintai 2025-02-08 15:10:23 +01:00
parent a980238482
commit 42a2979d3e
2 changed files with 3 additions and 2 deletions

View File

@ -329,10 +329,10 @@ EditorPlugin::AfterGUIInput TerrainWorldEditor::forward_spatial_input_event(Came
if (mb->get_button_index() == BUTTON_LEFT) {
switch (_tool_mode) {
case TOOL_MODE_ISOLEVEL_BRUSH: {
create_undo_point(_current_action, _isolevel_brush_channel, _isolevel_brush_allow_creating_chunks_button);
create_undo_point(_current_action, _isolevel_brush_channel, _isolevel_brush_allow_create_chunks);
} break;
case TOOL_MODE_PAINT_BRUSH: {
create_undo_point(_current_action, _paint_brush_channel, _paint_brush_allow_creating_chunks_button);
create_undo_point(_current_action, _paint_brush_channel, _paint_brush_allow_create_chunks);
} break;
case TOOL_MODE_PAINT_PICKER: {
Vector3 position;

View File

@ -82,6 +82,7 @@ protected:
// Used by UndoRedo
void apply_data(const Array &p_data);
void do_chunk_added_action(const Array &p_data);
void undo_chunk_added_action(const Array &p_data);
void do_chunk_removed_action(const Array &p_data);