Press escape to deselect, stop editing elements, and go back to edit tool

This commit is contained in:
Yousef Khadadeh 2025-09-29 15:15:16 +03:00
parent 762016be4c
commit b58e11c703
9 changed files with 22 additions and 21 deletions

View file

@ -57,7 +57,7 @@ void EditTool::switch_tool(DrawingProgramToolType newTool) {
controls.pointDragging = nullptr;
controls.isEditing = false;
if(newTool != DrawingProgramToolType::RECTSELECT && newTool != DrawingProgramToolType::LASSOSELECT && newTool != DrawingProgramToolType::EDIT)
if(!drawP.is_selection_tool(newTool))
drawP.selection.deselect_all();
}