Reviewed PR: FreeCAD/FreeCAD#30711
Head reviewed: 525d3586f5
showDialog() re-adds an existing taskPanel to the QStackedWidget. Qt moves the widget, but taskInfos order stays unchanged, so vector index and stack index can diverge and show the wrong document's task panel.