Can undo placed images, and textbox insert only creates one undo action

This commit is contained in:
Yousef Khadadeh 2026-01-06 12:55:44 +03:00
parent c15a21e488
commit ffde2a3284
5 changed files with 57 additions and 47 deletions

View file

@ -72,7 +72,7 @@ void TextBoxTool::tool_update() {
textBox.d.p2 = ensure_points_have_distance(textBox.d.p1, textBox.d.p2, MINIMUM_DISTANCE_BETWEEN_BOUNDS);
if(!drawP.controls.leftClickHeld) {
auto editTool = std::make_unique<EditTool>(drawP);
editTool->edit_start(objInfoBeingEdited);
editTool->edit_start(objInfoBeingEdited, false);
drawP.toolToSwitchToAfterUpdate = std::move(editTool);
return;
}