fixed bug with window moveable toggle

This commit is contained in:
Paul Liverman III 2017-08-13 19:31:29 -07:00
parent 619e5fc8ce
commit f8f9ef53c8
2 changed files with 2 additions and 2 deletions

View File

@ -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

View File

@ -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