Skip to content

Commit

Permalink
Remove unnecessary diff
Browse files Browse the repository at this point in the history
  • Loading branch information
wkentaro committed Aug 2, 2024
1 parent 5bd4d67 commit 60a8f95
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions labelme/widgets/canvas.py
Original file line number Diff line number Diff line change
Expand Up @@ -439,11 +439,9 @@ def mousePressEvent(self, ev):
elif not self.outOfPixmap(pos):
# Create new shape.
self.current = Shape(
shape_type=(
"points"
if self.createMode in ["ai_polygon", "ai_mask"]
else self.createMode
)
shape_type="points"
if self.createMode in ["ai_polygon", "ai_mask"]
else self.createMode
)
self.current.addPoint(pos, label=0 if is_shift_pressed else 1)
if self.createMode == "point":
Expand Down Expand Up @@ -937,11 +935,9 @@ def wheelEvent(self, ev):
else:
self.scrollRequest.emit(
ev.delta(),
(
QtCore.Qt.Horizontal
if (QtCore.Qt.ShiftModifier == int(mods))
else QtCore.Qt.Vertical
),
QtCore.Qt.Horizontal
if (QtCore.Qt.ShiftModifier == int(mods))
else QtCore.Qt.Vertical,
)
else:
self.scrollRequest.emit(ev.delta(), QtCore.Qt.Horizontal)
Expand Down

0 comments on commit 60a8f95

Please sign in to comment.