-
-
Notifications
You must be signed in to change notification settings - Fork 68
Description
Expected behaviour
When I select the Tools->Manage Snippets... window, the first time, the size of the window is alright. I expect it to be the size I left it with when I close it then again select Tools->Manage Snippets...
Actual behaviour
Any subsequent times I do it the Manage Snippets window is too small to see the contents and I have to manually expand it.
Steps to reproduce the behaviour
Tools->Manage Snippets...
Note the size. Close the window
Tools->Manage Snippets...
Note the tiny size
MATE general version
Distributor ID: Ubuntu
Description: Ubuntu 18.10
Release: 18.10
Codename: cosmic
Package version
pluma - Version 1.20.2
Linux Distribution
Linux desktop 4.18.0-10-generic #11-Ubuntu SMP Thu Oct 11 15:13:55 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
Fix
The problem is that the lines to save the current size of the window
pluma/plugins/snippets/snippets/Manager.py
Lines 602 to 603 in 94b3061
| alloc = dlg.get_allocation() | |
| self.default_size = [alloc.width, alloc.height] |
get called after the relevant object gets destroyed
pluma/plugins/snippets/snippets/Manager.py
Line 616 in 94b3061
| self.dlg.destroy() |
as a result, a default size of (1, 1) from get_allocate on a destroyed object gets returned and used the default. I will push a make a PR with a fix that gets the size before the object gets destroyed.