Skip to content

Commit 5e32be6

Browse files
fix: undo happens on the first click
1 parent b16fc0b commit 5e32be6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/virtualbadge/view/draw_badge.dart

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,9 @@ class _BMBadgeState extends State<BMBadge> {
7575
}
7676

7777
void _handlePanEnd(DragEndDetails details) {
78-
drawProvider.commitGridUpdate(); // Apply shape or last freehand segment
78+
if (drawProvider.selectedShape != DrawShape.freehand) {
79+
drawProvider.commitGridUpdate();
80+
}
7981
dragStart = null;
8082
}
8183

0 commit comments

Comments
 (0)