From ef154944c756c3579193d41bd589c9ec9052fc28 Mon Sep 17 00:00:00 2001 From: AlexandreSajus Date: Wed, 8 Dec 2021 19:26:58 +0100 Subject: [PATCH] :beetle: saves splitter position correctly --- opencodeblocks/blocks/block.py | 6 ------ 1 file changed, 6 deletions(-) diff --git a/opencodeblocks/blocks/block.py b/opencodeblocks/blocks/block.py index 3a39bd9a..569d97b1 100644 --- a/opencodeblocks/blocks/block.py +++ b/opencodeblocks/blocks/block.py @@ -200,18 +200,12 @@ def update_splitter(self): """Change the geometry of the splitter to match the block""" # We make the resizing of splitter only affect # the last element of the split view - sizes = self.splitter.sizes() - old_height = self.splitter.height() self.splitter.setGeometry( int(self.edge_size), int(self.edge_size + self.title_widget.height()), int(self.width - self.edge_size * 2), int(self.height - self.edge_size * 2 - self.title_widget.height()), ) - if len(sizes) > 1: - height_delta = self.splitter.height() - old_height - sizes[-1] += height_delta - self.splitter.setSizes(sizes) def update_title(self): """Change the geometry of the title to match the block"""