diff --git a/src/screencast_keys/ops.py b/src/screencast_keys/ops.py index aaf3b92..5aa5d65 100644 --- a/src/screencast_keys/ops.py +++ b/src/screencast_keys/ops.py @@ -196,13 +196,16 @@ def draw_image(img, positions, tex_coords): if image_name_base in bpy.data.images: draw_image(bpy.data.images[image_name_base], positions, tex_coords) - if left_button_status in ('PRESS', 'CLICK_DRAG') and (image_name_overlay_lmouse in bpy.data.images): + if left_button_status in ('PRESS', 'CLICK_DRAG') and \ + (image_name_overlay_lmouse in bpy.data.images): draw_image(bpy.data.images[image_name_overlay_lmouse], positions, tex_coords) - if right_button_status in ('PRESS', 'CLICK_DRAG') and (image_name_overlay_rmouse in bpy.data.images): + if right_button_status in ('PRESS', 'CLICK_DRAG') and \ + (image_name_overlay_rmouse in bpy.data.images): draw_image(bpy.data.images[image_name_overlay_rmouse], positions, tex_coords) - if middle_button_status in ('PRESS', 'CLICK_DRAG') and (image_name_overlay_mmouse in bpy.data.images): + if middle_button_status in ('PRESS', 'CLICK_DRAG') and \ + (image_name_overlay_mmouse in bpy.data.images): draw_image(bpy.data.images[image_name_overlay_mmouse], positions, tex_coords) @@ -1749,10 +1752,10 @@ def update_mouse_buttons_status(self, event): for k in self.mouse_buttons_status.keys(): self.mouse_buttons_status[k] = 'RELEASE' else: - for k in self.mouse_buttons_status.keys(): + for k, v in self.mouse_buttons_status.items(): if k == 'MIDDLEMOUSE': continue - if k == 'LEFTMOUSE' and self.mouse_buttons_status[k] == 'CLICK_DRAG': + if k == 'LEFTMOUSE' and v == 'CLICK_DRAG': continue self.mouse_buttons_status[k] = 'RELEASE'