fix python error when mouse over previous point and distance lock is enabled