723 os.path.isfile("{0}.profile".format(basename)) or \ |
723 os.path.isfile("{0}.profile".format(basename)) or \ |
724 os.path.isfile("{0}.profile".format(tbasename)) |
724 os.path.isfile("{0}.profile".format(tbasename)) |
725 coEnable = (coEnable or |
725 coEnable = (coEnable or |
726 os.path.isfile("{0}.coverage".format(basename)) or |
726 os.path.isfile("{0}.coverage".format(basename)) or |
727 os.path.isfile("{0}.coverage".format(tbasename))) and \ |
727 os.path.isfile("{0}.coverage".format(tbasename))) and \ |
728 self.project.isPy3Project() |
728 (self.project.isPy3Project() or self.project.isPy2Project()) |
729 |
729 |
730 # now check the selected item |
730 # now check the selected item |
731 itm = self.model().item(self.currentIndex()) |
731 itm = self.model().item(self.currentIndex()) |
732 fn = itm.fileName() |
732 fn = itm.fileName() |
733 if fn is not None: |
733 if fn is not None: |
734 basename = os.path.splitext(fn)[0] |
734 basename = os.path.splitext(fn)[0] |
735 prEnable = prEnable or \ |
735 prEnable = prEnable or \ |
736 os.path.isfile("{0}.profile".format(basename)) |
736 os.path.isfile("{0}.profile".format(basename)) |
737 coEnable = (coEnable or |
737 coEnable = (coEnable or |
738 os.path.isfile("{0}.coverage".format(basename))) and \ |
738 os.path.isfile("{0}.coverage".format(basename))) and \ |
739 itm.isPython3File() |
739 (itm.isPython3File() or itm.isPython2File()) |
740 |
740 |
741 self.profileMenuAction.setEnabled(prEnable) |
741 self.profileMenuAction.setEnabled(prEnable) |
742 self.coverageMenuAction.setEnabled(coEnable) |
742 self.coverageMenuAction.setEnabled(coEnable) |
743 |
743 |
744 self.showMenu.emit("Show", self.menuShow) |
744 self.showMenu.emit("Show", self.menuShow) |