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.
This commit is contained in:
abakkk 2019-12-28 13:28:25 +01:00
parent bb78937d60
commit 944500fc24
1 changed files with 2 additions and 1 deletions

View File

@ -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();