Changing colors changes colors of active object
This commit is contained in:
parent
b46c6e599b
commit
22b08e2461
|
|
@ -309,6 +309,8 @@ root.onMouseMove = onMouseMoveGroup
|
||||||
root.onMouseDrag = onMouseDragGroup
|
root.onMouseDrag = onMouseDragGroup
|
||||||
root.onKeyDown = onKeyDownGroup
|
root.onKeyDown = onKeyDownGroup
|
||||||
|
|
||||||
|
svlgui.root = root
|
||||||
|
|
||||||
e=ellipse(100,100,100,50,None)
|
e=ellipse(100,100,100,50,None)
|
||||||
e.onMouseDown = onMouseDownObj
|
e.onMouseDown = onMouseDownObj
|
||||||
e.onMouseMove = onMouseMoveObj
|
e.onMouseMove = onMouseMoveObj
|
||||||
|
|
|
||||||
|
|
@ -1866,6 +1866,7 @@ class framewrapper (object):
|
||||||
miny = property(getminy)
|
miny = property(getminy)
|
||||||
maxx = property(getmaxx)
|
maxx = property(getmaxx)
|
||||||
maxy = property(getmaxy)
|
maxy = property(getmaxy)
|
||||||
|
|
||||||
def hitTest(self, x, y):
|
def hitTest(self, x, y):
|
||||||
x,y = self.transformcoords(x,y)
|
x,y = self.transformcoords(x,y)
|
||||||
return self.obj.hitTest(x, y)
|
return self.obj.hitTest(x, y)
|
||||||
|
|
@ -2623,11 +2624,18 @@ class ColorSelectionWindow:
|
||||||
def onClickRectFill(self,x,y):
|
def onClickRectFill(self,x,y):
|
||||||
global FILLCOLOR
|
global FILLCOLOR
|
||||||
FILLCOLOR = Color(colors.colorArray(int(x/16))[int(y/16)])
|
FILLCOLOR = Color(colors.colorArray(int(x/16))[int(y/16)])
|
||||||
|
if root.descendItem().activelayer.currentselect:
|
||||||
|
root.descendItem().activelayer.currentselect.fillcolor = FILLCOLOR
|
||||||
|
root.descendItem().activelayer.currentselect.filled = True
|
||||||
|
root.descendItem().activelayer.currentselect.update()
|
||||||
self.window.dismiss()
|
self.window.dismiss()
|
||||||
raise ObjectDeletedError
|
raise ObjectDeletedError
|
||||||
def onClickRectLine(self,x,y):
|
def onClickRectLine(self,x,y):
|
||||||
global LINECOLOR
|
global LINECOLOR
|
||||||
LINECOLOR = Color(colors.colorArray(int(x/16))[int(y/16)])
|
LINECOLOR = Color(colors.colorArray(int(x/16))[int(y/16)])
|
||||||
|
if root.descendItem().activelayer.currentselect:
|
||||||
|
root.descendItem().activelayer.currentselect.linecolor = LINECOLOR
|
||||||
|
root.descendItem().activelayer.currentselect.update()
|
||||||
self.window.dismiss()
|
self.window.dismiss()
|
||||||
raise ObjectDeletedError
|
raise ObjectDeletedError
|
||||||
canvas = Canvas(336,208)
|
canvas = Canvas(336,208)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue