From 944500fc24e10b6b8eced0069df9f4745e6c95b7 Mon Sep 17 00:00:00 2001 From: abakkk Date: Sat, 28 Dec 2019 13:28:25 +0100 Subject: [PATCH] do not create menu when leaving drawing mode 'this.menu.close()' called the getter 'this.menu' that create the menu if it's not exist, which is not wanted when leaving drawing mode. --- draw.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/draw.js b/draw.js index 1dd7f6b..be908ec 100644 --- a/draw.js +++ b/draw.js @@ -581,7 +581,8 @@ var DrawingArea = new Lang.Class({ this.dashedLine = false; this.fill = false; this._redisplay(); - this.menu.close(); + if (this._menu) + this._menu.close(); this.get_parent().set_background_color(null); if (save) this.saveAsJson();