Fixed textbox and screenshot tool issues related to new tool system

This commit is contained in:
Yousef Khadadeh 2025-08-02 21:14:57 +03:00
parent c2301ae9f5
commit c8d8a349aa
4 changed files with 16 additions and 10 deletions

View file

@ -309,6 +309,11 @@ void DrawingProgram::update() {
compCache.test_rebuild(components.client_list());
}
void DrawingProgram::switch_to_tool_ptr(std::unique_ptr<DrawingProgramToolBase> newTool) {
drawTool->switch_tool(newTool->get_type());
drawTool = std::move(newTool);
}
void DrawingProgram::switch_to_tool(DrawingProgramToolType newToolType) {
if(newToolType != drawTool->get_type()) {
drawTool->switch_tool(drawTool->get_type());