Skip to content

Commit

Permalink
following conventions after reading on a few pr
Browse files Browse the repository at this point in the history
  • Loading branch information
Mr-Anyone committed Nov 12, 2024
1 parent ec869bc commit c4e365d
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

from proto.import_all_protos import *
from software.py_constants import *
from software.thunderscope.gl.helpers.observable_list import ObservableList
from software.thunderscope.proto_unix_io import ProtoUnixIO

from software.thunderscope.gl.layers.gl_layer import GLLayer
Expand Down Expand Up @@ -37,7 +38,7 @@ def __init__(
self.obstacles: List[Obstacle] = []

# used for keeping track and rendering multiple polygons
self.rendering_polygons: List[GLPolygon] = []
self.rendering_polygons: ObservableList = ObservableList(self._graphics_changed)

def keyPressEvent(self, event: QtGui.QKeyEvent) -> None:
"""Responding to key events that are going to push obstacles to the stack or add point
Expand All @@ -57,7 +58,7 @@ def clear_polygons(self):

for polygon in self.rendering_polygons:
polygon.hide()
self.rendering_polygons.clear()
self.rendering_polygons.resize(0, lambda: {})
self.current_polygon.hide()
self.current_polygon = GLPolygon(parent_item=self, line_width=2)

Expand Down

0 comments on commit c4e365d

Please sign in to comment.