mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 06:27:45 +00:00
PixelPaint: Allow tools to know when the user has left them
This commit is contained in:
parent
d28c9ba054
commit
a321df12e1
2 changed files with 4 additions and 1 deletions
|
@ -521,8 +521,10 @@ void ImageEditor::set_active_tool(Tool* tool)
|
|||
return;
|
||||
}
|
||||
|
||||
if (m_active_tool)
|
||||
if (m_active_tool) {
|
||||
m_active_tool->on_tool_deactivation();
|
||||
m_active_tool->clear();
|
||||
}
|
||||
|
||||
m_active_tool = tool;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue