diff --git a/src/tools/circlecount/circlecounttool.cpp b/src/tools/circlecount/circlecounttool.cpp index 6e4ee01a96..f45ab01320 100644 --- a/src/tools/circlecount/circlecounttool.cpp +++ b/src/tools/circlecount/circlecounttool.cpp @@ -130,9 +130,6 @@ void CircleCountTool::drawStart(const CaptureContext& context) } m_points.first = context.mousePos; m_count = context.circleCount; - - SPDLOG_DEBUG("Requesting Circle Increment."); - emit requestAction(REQ_INCREMENT_CIRCLE_COUNT); } void CircleCountTool::pressed(const CaptureContext& context) diff --git a/src/widgets/capture/capturewidget.cpp b/src/widgets/capture/capturewidget.cpp index 95358896c9..9722cf16da 100644 --- a/src/widgets/capture/capturewidget.cpp +++ b/src/widgets/capture/capturewidget.cpp @@ -890,10 +890,6 @@ void CaptureWidget::handleButtonSignal(CaptureTool::Request r) m_undoStack.undo(); break; case CaptureTool::REQ_REDO_MODIFICATION: - if (m_undoStack.redoText() == "Circle Counter") { - SPDLOG_DEBUG("Redo Circle Increment."); - this->incrementCircleCount(); - } m_undoStack.redo(); break; case CaptureTool::REQ_REDRAW: diff --git a/src/widgets/capture/modificationcommand.cpp b/src/widgets/capture/modificationcommand.cpp index 63adb2b281..a495122555 100644 --- a/src/widgets/capture/modificationcommand.cpp +++ b/src/widgets/capture/modificationcommand.cpp @@ -35,4 +35,8 @@ void ModificationCommand::redo() QPainter p(m_pixmap); p.setRenderHint(QPainter::Antialiasing); m_tool->process(p, *m_pixmap, true); + if (m_tool->nameID() == ToolType::CIRCLECOUNT) { + emit this->m_tool->requestAction( + CaptureTool::Request::REQ_INCREMENT_CIRCLE_COUNT); + } }