Create drawing menu on demand

This commit is contained in:
abakkk 2019-10-11 09:39:17 +02:00
parent 8671a9e502
commit 7d9bb459b4
1 changed files with 6 additions and 1 deletions

View File

@ -80,7 +80,6 @@ var DrawingArea = new Lang.Class({
this.settings = Convenience.getSettings();
this.emitter = new DrawingAreaEmitter();
this.monitor = monitor;
this.menu = new DrawingMenu(this);
this.helper = helper;
this.elements = [];
@ -98,6 +97,12 @@ var DrawingArea = new Lang.Class({
this._loadJson();
},
get menu() {
if (!this._menu)
this._menu = new DrawingMenu(this);
return this._menu;
},
_redisplay: function() {
// force area to emit 'repaint'
this.queue_repaint();