Skip to content

Commit 84b7fe2

Browse files
committed
annotation: counter bubble: fix count
1 parent 6020d94 commit 84b7fe2

1 file changed

Lines changed: 1 addition & 12 deletions

File tree

src/screenshot_tool.cpp

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -701,16 +701,9 @@ void ScreenshotTool::HandleAnnotationInput()
701701
m_current_annotation.points.clear();
702702

703703
if (m_current_tool == ToolType::Pencil)
704-
{
705704
m_current_annotation.points.push_back(m_current_annotation.start);
706-
}
707-
// Assign the next counter value for CounterBubble annotations
708705
else if (m_current_tool == ToolType::CounterBubble)
709-
{
710-
if (m_current_count < 1)
711-
m_current_count = 0;
712-
m_current_annotation.count = ++m_current_count;
713-
}
706+
m_current_annotation.count = m_current_count++;
714707
}
715708

716709
if (m_is_drawing && ImGui::IsMouseDown(ImGuiMouseButton_Left))
@@ -749,11 +742,7 @@ void ScreenshotTool::HandleAnnotationInput()
749742
}
750743

751744
if (should_add)
752-
{
753-
if (m_current_tool == ToolType::CounterBubble)
754-
m_current_annotation.count = m_current_count;
755745
m_annotations.push_back(m_current_annotation);
756-
}
757746

758747
m_current_annotation = annotation_t{};
759748
}

0 commit comments

Comments
 (0)