diff --git a/Tutorials/STC-SEG-103_AIBasedSegmentationIn3DSlicer/AIBasedSegmentationIn3DSlicer.py b/Tutorials/STC-SEG-103_AIBasedSegmentationIn3DSlicer/AIBasedSegmentationIn3DSlicer.py index 98e6575..ee5b638 100644 --- a/Tutorials/STC-SEG-103_AIBasedSegmentationIn3DSlicer/AIBasedSegmentationIn3DSlicer.py +++ b/Tutorials/STC-SEG-103_AIBasedSegmentationIn3DSlicer/AIBasedSegmentationIn3DSlicer.py @@ -230,7 +230,9 @@ def test_Slicer4Minute1(self): modMenu = combo.parent().children()[4] combo.showPopup() for mActions in modMenu.actions(): - if mActions.text == translate("qSlicerAbstractCoreModule","Segmentation") or mActions.text == "Segmentation": + # Only a category opens a submenu. Some languages (e.g. Chinese) give the Segmentations module + # and the Segmentation category the same label, and the module entry comes first in the menu. + if mActions.menu() and (mActions.text == translate("qSlicerAbstractCoreModule","Segmentation") or mActions.text == "Segmentation"): segAction = mActions modMenu.setActiveAction(segAction) mainWindow.moduleSelector().selectModule('MONAIAuto3DSeg')