From f9f247ecaf9b04fa47033f1fb6d4198931ddc4da Mon Sep 17 00:00:00 2001
From: tibbi <tibor@kaputa.sk>
Date: Sat, 12 Jan 2019 17:55:38 +0100
Subject: [PATCH] save and restore canvas around drawing the background

---
 .../simplemobiletools/gallery/pro/views/EditorDrawCanvas.kt    | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/views/EditorDrawCanvas.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/views/EditorDrawCanvas.kt
index 9619e24bc..9de902b29 100644
--- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/views/EditorDrawCanvas.kt
+++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/views/EditorDrawCanvas.kt
@@ -11,12 +11,15 @@ class EditorDrawCanvas(context: Context, attrs: AttributeSet) : View(context, at
 
     override fun onDraw(canvas: Canvas) {
         super.onDraw(canvas)
+        canvas.save()
 
         if (backgroundBitmap != null) {
             val left = (width - backgroundBitmap!!.width) / 2
             val top = (height - backgroundBitmap!!.height) / 2
             canvas.drawBitmap(backgroundBitmap, left.toFloat(), top.toFloat(), null)
         }
+
+        canvas.restore()
     }
 
     fun updateBackgroundBitmap(bitmap: Bitmap) {