mirror of
https://github.com/python/cpython.git
synced 2025-10-19 21:28:02 +00:00
gh-91212: Fixed flickering when the tracer is turned off (#95129)
Fixed flickering when the tracer is turned off.
This commit is contained in:
parent
c759944f16
commit
4652093e1b
3 changed files with 2 additions and 2 deletions
|
@ -596,7 +596,6 @@ class TurtleScreenBase(object):
|
||||||
item = self.cv.create_text(x-1, -y, text = txt, anchor = anchor[align],
|
item = self.cv.create_text(x-1, -y, text = txt, anchor = anchor[align],
|
||||||
fill = pencolor, font = font)
|
fill = pencolor, font = font)
|
||||||
x0, y0, x1, y1 = self.cv.bbox(item)
|
x0, y0, x1, y1 = self.cv.bbox(item)
|
||||||
self.cv.update()
|
|
||||||
return item, x1-1
|
return item, x1-1
|
||||||
|
|
||||||
## def _dot(self, pos, size, color):
|
## def _dot(self, pos, size, color):
|
||||||
|
@ -3419,6 +3418,7 @@ class RawTurtle(TPen, TNavigator):
|
||||||
"""
|
"""
|
||||||
item, end = self.screen._write(self._position, txt, align, font,
|
item, end = self.screen._write(self._position, txt, align, font,
|
||||||
self._pencolor)
|
self._pencolor)
|
||||||
|
self._update()
|
||||||
self.items.append(item)
|
self.items.append(item)
|
||||||
if self.undobuffer:
|
if self.undobuffer:
|
||||||
self.undobuffer.push(("wri", item))
|
self.undobuffer.push(("wri", item))
|
||||||
|
|
|
@ -109,7 +109,6 @@ def tick():
|
||||||
writer.write(datum(t),
|
writer.write(datum(t),
|
||||||
align="center", font=("Courier", 14, "bold"))
|
align="center", font=("Courier", 14, "bold"))
|
||||||
writer.forward(85)
|
writer.forward(85)
|
||||||
tracer(True)
|
|
||||||
second_hand.setheading(6*sekunde) # or here
|
second_hand.setheading(6*sekunde) # or here
|
||||||
minute_hand.setheading(6*minute)
|
minute_hand.setheading(6*minute)
|
||||||
hour_hand.setheading(30*stunde)
|
hour_hand.setheading(30*stunde)
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
Fixed flickering of the turtle window when the tracer is turned off. Patch by Shin-myoung-serp.
|
Loading…
Add table
Add a link
Reference in a new issue