Skip to content

Bug in size of snippets Window #391

@andrewfowlie

Description

@andrewfowlie

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

alloc = dlg.get_allocation()
self.default_size = [alloc.width, alloc.height]

get called after the relevant object gets destroyed

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions