Don’t rebuild the lines on resize when the width has not changed
- because it is an heavy operation, and it is useless, since the lines only change when the width changes.
This commit is contained in:
parent
6a81c021e1
commit
61f469bc12
1 changed files with 5 additions and 1 deletions
|
@ -946,8 +946,12 @@ class TextWin(Win):
|
||||||
|
|
||||||
def resize(self, height, width, y, x, room=None):
|
def resize(self, height, width, y, x, room=None):
|
||||||
with g_lock:
|
with g_lock:
|
||||||
|
if hasattr(self, 'width'):
|
||||||
|
old_width = self.width
|
||||||
|
else:
|
||||||
|
old_width = None
|
||||||
self._resize(height, width, y, x)
|
self._resize(height, width, y, x)
|
||||||
if room:
|
if room and self.width != old_width:
|
||||||
self.rebuild_everything(room)
|
self.rebuild_everything(room)
|
||||||
|
|
||||||
def rebuild_everything(self, room):
|
def rebuild_everything(self, room):
|
||||||
|
|
Loading…
Reference in a new issue