def __deleteButtonClicked( self, button ) :

		paths = self.__pathListing.getPath().children()
		selectedPreset = self.__pathListing.getSelectedPaths()[0][0]
		selectedIndex = [ p[0] for p in paths ].index( selectedPreset )

		with Gaffer.UndoContext( self.__plug.ancestor( Gaffer.ScriptNode ) ) :
			Gaffer.Metadata.deregisterPlugValue( self.__plug, "preset:" + selectedPreset )

		del paths[selectedIndex]
		if len( paths ) :
			self.__pathListing.setSelectedPaths( [ paths[min(selectedIndex,1-len( paths ))] ] )

		return True
dataset/ETHPy150Open ImageEngine/gaffer/python/GafferUI/UIEditor.py/_PresetsEditor.__deleteButtonClicked/swapped operands of `-`