From f8f9ef53c88f24493df163845ad56bf620f1c317 Mon Sep 17 00:00:00 2001 From: Paul Liverman III Date: Sun, 13 Aug 2017 19:31:29 -0700 Subject: [PATCH] fixed bug with window moveable toggle --- elements/window.lua | 2 +- elements/window.moon | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/elements/window.lua b/elements/window.lua index d14efab..318a4d2 100644 --- a/elements/window.lua +++ b/elements/window.lua @@ -318,7 +318,7 @@ do return false end self.header.mousepressed = function(self, x, y, button) - if self.data.moveable and button == pop.constants.left_mouse then + if button == pop.constants.left_mouse and self.parent.data.moveable then local grandparent = self.parent.parent table.insert(grandparent.child, table.remove(grandparent.child, grandparent:indexOf(self.parent))) selected = true diff --git a/elements/window.moon b/elements/window.moon index 03a4b21..2a1db96 100644 --- a/elements/window.moon +++ b/elements/window.moon @@ -143,7 +143,7 @@ class window extends element return false @header.mousepressed = (x, y, button) => - if @data.moveable and button == pop.constants.left_mouse + if button == pop.constants.left_mouse and @parent.data.moveable grandparent = @parent.parent table.insert grandparent.child, table.remove(grandparent.child, grandparent\indexOf @parent) selected = true