Skip to content
This repository has been archived by the owner on Feb 29, 2024. It is now read-only.

change several implicit conversion into explicit conversion #1021

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion labelImg.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ def __init__(self, default_filename=None, default_prefdef_class_file=None, defau
self.file_dock.setFeatures(QDockWidget.DockWidgetFloatable)

self.dock_features = QDockWidget.DockWidgetClosable | QDockWidget.DockWidgetFloatable
self.dock.setFeatures(self.dock.features() ^ self.dock_features)
self.dock.setFeatures(self.dock.features() ^ int(self.dock_features))

# Actions
action = partial(new_action, self)
Expand Down
4 changes: 2 additions & 2 deletions libs/canvas.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ def mouseMoveEvent(self, ev):
return

# Polygon copy moving.
if Qt.RightButton & ev.buttons():
if bool(Qt.RightButton) & bool(ev.buttons()):
if self.selected_shape_copy and self.prev_point:
self.override_cursor(CURSOR_MOVE)
self.bounded_move_shape(self.selected_shape_copy, pos)
Expand All @@ -176,7 +176,7 @@ def mouseMoveEvent(self, ev):
return

# Polygon/Vertex moving.
if Qt.LeftButton & ev.buttons():
if bool(Qt.LeftButton) & bool(ev.buttons()):
if self.selected_vertex():
self.bounded_move_vertex(pos)
self.shapeMoved.emit()
Expand Down