Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing bug in checking whether the ROIs_on checkbox is checked #1029

Closed
wants to merge 8 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions suite2p/gui/gui2p.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ def make_buttons(self):
return b0

def roi_text(self, state):
if state == QtCore.Qt.Checked:
if QtCore.Qt.CheckState(state) == QtCore.Qt.Checked:
for n in range(len(self.roi_text_labels)):
if self.iscell[n] == 1:
self.p1.addItem(self.roi_text_labels[n])
Expand All @@ -232,7 +232,7 @@ def roi_text(self, state):

def zoom_cell(self, state):
if self.loaded:
if state == QtCore.Qt.Checked:
if QtCore.Qt.CheckState(state) == QtCore.Qt.Checked:
self.zoomtocell = True
else:
self.zoomtocell = False
Expand Down Expand Up @@ -554,7 +554,7 @@ def number_chosen(self):
self.show()

def ROIs_on(self, state):
if state == QtCore.Qt.Checked:
if QtCore.Qt.CheckState(state) == QtCore.Qt.Checked:
self.ops_plot["ROIs_on"] = True
self.p1.addItem(self.color1)
self.p2.addItem(self.color2)
Expand Down