vanilla icon indicating copy to clipboard operation
vanilla copied to clipboard

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

Open simoncozens opened this issue 4 years ago • 0 comments

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.

simoncozens avatar Nov 23 '21 10:11 simoncozens