def __incrementIndex( self, index, increment ) :

		text = self.getText()
		if '.' in text :
			decimalIndex = text.find( "." )
			if decimalIndex >= index :
				index += 1
		else :
			decimalIndex = len( text ) - 1

		powIndex = decimalIndex - index

		value = self.__numericType( text )
		value += increment * self.__numericType( pow( 10, powIndex ) )

		self.__setValueInternal( value, self.ValueChangedReason.Increment )

		newText = self.getText()

		# add any required leading or trailing 0 to ensure that
		# keyboard increments are consistent

		oldLengthBefore, oldHasPeriod, oldLengthAfter = [ len( item ) for item in text.lstrip( "-" ).partition( "." ) ]
		newLengthBefore, newHasPeriod, newLengthAfter = [ len( item ) for item in newText.lstrip( "-" ).partition( "." ) ]

		headPadding = "0" * max(0, oldLengthBefore - newLengthBefore )
		tailPadding = "0" * max(0, oldLengthAfter - newLengthAfter )

		if not newHasPeriod and tailPadding :
			tailPadding = "." + tailPadding

		if newText[0] == "-" :
			newText = "-" + headPadding + newText[1:] + tailPadding
		else:
			newText = headPadding + newText + tailPadding

		self.setText( newText )

		# adjust the cursor position to be in the same column as before
		if '.' in newText :
			newDecimalIndex = newText.find( "." )
			newIndex = newDecimalIndex - powIndex
			if powIndex >= 0 :
				newIndex -= 1
		else :
			newIndex = len( newText ) - 1 - powIndex
		if newIndex < 0 :
			newIndex = 0

		self.setCursorPosition( newIndex )
dataset/ETHPy150Open ImageEngine/gaffer/python/GafferUI/NumericWidget.py/NumericWidget.__incrementIndex/original