Skip to content

Commit b5b66a8

Browse files
committed
Remove profiling
1 parent dcc868f commit b5b66a8

File tree

1 file changed

+3
-14
lines changed

1 file changed

+3
-14
lines changed

lglpy/timeline/drawable/timeline_base.py

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -514,18 +514,13 @@ def on_mouse_drag_release(self, button, drag):
514514
# Find the clicked objects
515515
dt = self.drawable_trace
516516

517-
import time
518-
t1 = time.time()
519517
clicked_objects = dt.get_boxed_objects(min_x, min_y, max_x, max_y)
520-
t2 = time.time()
521-
print(f"A Elapsed: {(t2-t1)*1000.0} ms")
522518
if not clicked_objects:
523519
# Force a redraw if we were dragging, even if the click itself
524520
# didn't do anything.
525521
return True
526522

527523
# If no modifier then create selection from highlighted region
528-
t1 = time.time()
529524
if drag.mod == '':
530525
self.active_objects.clear()
531526
self.add_multiple_to_active_objects(clicked_objects)
@@ -534,13 +529,10 @@ def on_mouse_drag_release(self, button, drag):
534529
elif drag.mod == 'c':
535530
self.add_multiple_to_active_objects(clicked_objects)
536531

537-
# If 's' modifier then append selection to highlighted region
532+
# If 's' modifier then subtract selection to highlighted region
538533
elif drag.mod == 's':
539534
self.remove_multiple_from_active_objects(clicked_objects)
540535

541-
t2 = time.time()
542-
print(f"B Elapsed: {(t2-t1)*1000.0} ms")
543-
544536
return True
545537

546538
def on_mouse_single_click(self, button, x, y, mod):
@@ -577,11 +569,8 @@ def on_mouse_single_click(self, button, x, y, mod):
577569

578570
if (button == 'left') and clicked_object:
579571
if mod == '':
580-
if clicked_object in self.active_objects:
581-
self.remove_from_active_objects(clicked_object)
582-
else:
583-
self.active_objects.clear()
584-
self.add_to_active_objects(clicked_object)
572+
self.active_objects.clear()
573+
self.add_to_active_objects(clicked_object)
585574
return True
586575

587576
elif mod == 's':

0 commit comments

Comments
 (0)