feat: Manage active drawing tool state in controller and UI
Co-authored-by: aider (gemini/gemini-2.5-pro) <aider@aider.chat>
This commit is contained in:
@@ -34,6 +34,21 @@ SketchFeature* ApplicationController::activeSketch() const
|
||||
return m_activeSketch;
|
||||
}
|
||||
|
||||
ApplicationController::ToolType ApplicationController::activeTool() const
|
||||
{
|
||||
return m_activeTool;
|
||||
}
|
||||
|
||||
void ApplicationController::setActiveTool(ToolType tool)
|
||||
{
|
||||
if (m_activeTool == tool) {
|
||||
return;
|
||||
}
|
||||
|
||||
m_activeTool = tool;
|
||||
emit activeToolChanged(m_activeTool);
|
||||
}
|
||||
|
||||
void ApplicationController::newDocument()
|
||||
{
|
||||
m_activeSketch = nullptr;
|
||||
@@ -114,6 +129,7 @@ void ApplicationController::beginSketchCreation()
|
||||
void ApplicationController::endSketch()
|
||||
{
|
||||
m_activeSketch = nullptr;
|
||||
setActiveTool(ToolType::None);
|
||||
emit sketchModeEnded();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user