diff -r 6a042a54e0f7 -r 385f60c94548 eric6/Tools/TRPreviewer.py --- a/eric6/Tools/TRPreviewer.py Sat Apr 10 17:54:58 2021 +0200 +++ b/eric6/Tools/TRPreviewer.py Sat Apr 10 18:31:17 2021 +0200 @@ -871,13 +871,11 @@ @param windowMenu reference to the window menu """ - idx = 0 - for wid in self.widgets: + for idx, wid in enumerate(self.widgets): act = windowMenu.addAction(wid.windowTitle()) act.setData(idx) act.setCheckable(True) act.setChecked(not wid.isHidden()) - idx = idx + 1 def toggleSelectedWidget(self, act): """