Skip to content

Removing a row from a GridView does not remove it from the view #158

@simoncozens

Description

@simoncozens

Minimal example:

class SimpleAppWindow(object):
    def __init__(self):
        self.w = vanilla.Window((250, 120), "Simple App Window", closable=False)
        self.w.gridview = vanilla.GridView((10, 10, -10, 70), [
            [vanilla.PopUpButton("auto", ["I should be removed"])],
            [vanilla.PopUpButton("auto", ["I should remain"])],
        ])
        self.w.button = vanilla.Button((10, 90, -10, 20), "Press me", callback=self.deleteTopRow)
        self.w.open()

    def deleteTopRow(self, sender):
        self.w.gridview.removeRow(0)
        # PUSH IT HARDER
        self.w.setNeedsDisplay()
        self.w.displayIfNeeded()

Before pressing the button (correct):
Screenshot 2021-11-23 at 10 45 38

After pressing the button:

Screenshot 2021-11-23 at 10 44 10

The first popup button can still be opened, selected, etc.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions