def move(self, origin, target, emit=True):
        if origin == target or origin + 1 == target:
            return

        keys = sorted(self._order.keys())
        dpositionOrigin = keys[origin]
        trackUid = self._order[dpositionOrigin]

        if target == 0:
            dpositionTarget = keys[0] / 2
        elif target >= len(self._order):
            dpositionTarget = max(self._order.keys()) + 1
        else:
            dpositionTarget = (keys[target] + keys[target - 1]) / 2

        self.mark()

        del self._order[dpositionOrigin]
        self._order[dpositionTarget] = trackUid

        if emit:
            self.onChanged()