UIMiniWindowContainer small improve (#938)

Change type of checking whether window have on drop possibility.

Reason:
Previously this parameter was checking by class name, so it blocking creating similar objects to miniwindow or inheritance from miniwindow object without changing sources. So it block creating modules with new UI objects working with miniwindowcontainer.
This commit is contained in:
EgzoT 2018-02-28 21:46:27 +01:00 committed by Ahmed Samy
parent e6f273d5e1
commit b58c438015
2 changed files with 2 additions and 1 deletions

View File

@ -3,6 +3,7 @@ UIMiniWindow = extends(UIWindow, "UIMiniWindow")
function UIMiniWindow.create() function UIMiniWindow.create()
local miniwindow = UIMiniWindow.internalCreate() local miniwindow = UIMiniWindow.internalCreate()
miniwindow.UIMiniWindowContainer = true
return miniwindow return miniwindow
end end

View File

@ -83,7 +83,7 @@ function UIMiniWindowContainer:fitAll(noRemoveChild)
end end
function UIMiniWindowContainer:onDrop(widget, mousePos) function UIMiniWindowContainer:onDrop(widget, mousePos)
if widget:getClassName() == 'UIMiniWindow' then if widget.UIMiniWindowContainer then
local oldParent = widget:getParent() local oldParent = widget:getParent()
if oldParent == self then if oldParent == self then
return true return true