IGantt.RenumberAllGanttTasksAccordingToCurrentDisplayOrder Method
Does nothing in Waterfall mode (see File / Options / Display).
You can use RowOrderForWBSOrientedDiagram to set a particular position value for a given task. Let's say you want to insert a task between task 3 and task 4: Create a new task and give RowOrderForWBSOrientedDiagram a value of 3.5. Then call current function and you'll get new task in position 4 and all tasks below properly shifted.
Available since QDV 7.13.0001.