Skip to content

Commit

Permalink
fixed issue with circle count undo redo
Browse files Browse the repository at this point in the history
  • Loading branch information
borgmanJeremy committed Jan 23, 2021
1 parent d8944d2 commit 265e42c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
3 changes: 0 additions & 3 deletions src/tools/circlecount/circlecounttool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 0 additions & 4 deletions src/widgets/capture/capturewidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 4 additions & 0 deletions src/widgets/capture/modificationcommand.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

0 comments on commit 265e42c

Please sign in to comment.