From cf76afc4adb002c170506c16dc4155a4ad8d6375 Mon Sep 17 00:00:00 2001 From: Mark MacKay Date: Tue, 12 Jan 2016 15:48:19 -0600 Subject: [PATCH] fixing issues when creating a new document --- editor/src/method-draw.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/editor/src/method-draw.js b/editor/src/method-draw.js index 2b82133..eb57c32 100644 --- a/editor/src/method-draw.js +++ b/editor/src/method-draw.js @@ -1345,7 +1345,7 @@ // updates the context panel tools based on the selected element var updateContextPanel = function(e) { - var elem = selectedElement; + var elem = selectedElement; // If element has just been deleted, consider it null if(elem != null && !elem.parentNode) elem = null; if (multiselected && multiselected[0] != null && !multiselected[0].parentNode) multiselected = false; @@ -2306,9 +2306,11 @@ $.confirm(uiStrings.notification.QwantToClear, function(ok) { if(!ok) return; setSelectMode(); + svgCanvas.deleteSelectedElements(); svgCanvas.clear(); svgCanvas.setResolution(dims[0], dims[1]); updateCanvas(true); + createBackground(); zoomImage(); updateContextPanel(); prepPaints();