

def buttonClick(self, event):
    curr = self._window._currentFeature.getValue()
    if (curr is None):
        nextt = self._app._allFeatures.firstItemId()
    else:
        nextt = self._app._allFeatures.nextItemId(event)
    while ((nextt is not None) and isinstance(nextt, FeatureSet)):
        nextt = self._app._allFeatures.nextItemId(nextt)
    if (nextt is not None):
        self._window._currentFeature.setValue(nextt)
    else:
        self.showNotification('Last sample')

dataset/ETHPy150Open rwl/muntjac/muntjac/demo/sampler/SamplerApplication.py NextClickListener.buttonClick/VarMisuse@60/80 `curr`->`event`