Skip to content

Commit 03d9cfd

Browse files
author
therealbluepandabear
committed
Fixed major bug in which after the user would clear the canvas, and then change their orientation, the bitmap would return to its state before it was cleared.
1 parent 430fff8 commit 03d9cfd

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

app/src/main/java/com/therealbluepandabear/pixapencil/activities/canvas/canvascommands/CanvasActivity+CanvasCommandsHelper+clearCanvas.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ import com.therealbluepandabear.pixapencil.extensions.clear
55

66
fun CanvasActivity.CanvasCommandsHelper.clearCanvas() {
77
baseReference.binding.activityCanvasPixelGridView.pixelGridViewBitmap.clear()
8+
baseReference.viewModel.currentBitmap = baseReference.binding.activityCanvasPixelGridView.pixelGridViewBitmap
9+
810
baseReference.viewModel.undoStack.clear()
911
baseReference.viewModel.redoStack.clear()
1012
}

0 commit comments

Comments
 (0)