def onRenameROI(self, event=None):
        roiname = self.get_roiname()
        errmsg = None
        if self.wids['roilist'].GetStrings() in roiname:
            errmsg = '%s is already in ROI list - use a unique name.' % roiname
        elif self.roilist_sel is None:
            errmsg = 'No ROI selected to rename.'
        if errmsg is not None:
            return Popup(self, errmsg, 'Cannot Rename ROI')

        if self.roilist_sel < len(self.det.mcas[0].rois):
            self.det.rename_roi(self.roilist_sel, roiname)
            names = self.wids['roilist'].GetStrings()
            names[self.roilist_sel] = roiname
            self.wids['roilist'].Clear()
            for sname in names:
                self.wids['roilist'].Append(sname)
            self.wids['roilist'].SetSelection(self.roilist_sel)
dataset/ETHPy150Open xraypy/xraylarch/plugins/epics/xrfcontrol.py/EpicsXRFDisplayFrame.onRenameROI/swapped operands of `in`