fix console re-init when dimensions are changed

This commit is contained in:
devfred78
2022-02-13 13:20:54 +01:00
parent be4202d5a5
commit b9a066a096

View File

@@ -587,10 +587,7 @@ class Console():
if value > 0:
self._width = value
# Console re-init
self._presentation_stream = deque([None] * self._width * self._height, self._char_memory_size)
self._cursor = 0
self._start_window = 0
self._end_window = self._width * self._height - 1
self._init_console()
else: self.log.warning(f"Console width cannot be negative. The previous value is kept: {self._width}")
@property
@@ -607,10 +604,7 @@ class Console():
if value > 0:
self._height = value
# Console re-init
self._presentation_stream = deque([None] * self._width * self._height, self._char_memory_size)
self._cursor = 0
self._start_window = 0
self._end_window = self._width * self._height - 1
self._init_console()
else: self.log.warning(f"Console height cannot be negative. The previous value is kept: {self._height}")
#############################################################