Error dropping transitions to the timeline if the Snapping Tool is off

Bug #700439 reported by Vlastimil Ott
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenShot Video Editor
Fix Released
High
Unassigned

Bug Description

I tried to use the transition clock left to right. It was not added and I found in .xsession-errors:

Hodiny zleva doprava
/usr/lib/pymodules/python2.6/openshot/transitions/clock_left_to_right.pgm
Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.6/openshot/windows/MainGTK.py", line 823, in on_drop_trans_from_tree
    self.drop_cb(self.new_transition, self.tree_drag_context, self.new_transition.get_bounds().x1, 0.0, self.tree_drag_time)
  File "/usr/lib/pymodules/python2.6/openshot/windows/MainGTK.py", line 1061, in drop_cb
    self.new_transition.animate(distance_from_clip, bottom_y - self.new_transition.get_bounds().y1, 1.0, 0.0, False, 200, 4, goocanvas.ANIMATE_FREEZE)
UnboundLocalError: local variable 'distance_from_clip' referenced before assignment
Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.6/openshot/windows/MainGTK.py", line 1061, in drop_cb
    self.new_transition.animate(distance_from_clip, bottom_y - self.new_transition.get_bounds().y1, 1.0, 0.0, False, 200, 4, goocanvas.ANIMATE_FREEZE)
UnboundLocalError: local variable 'distance_from_clip' referenced before assignment
Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.6/openshot/windows/MainGTK.py", line 823, in on_drop_trans_from_tree
    self.drop_cb(self.new_transition, self.tree_drag_context, self.new_transition.get_bounds().x1, 0.0, self.tree_drag_time)
  File "/usr/lib/pymodules/python2.6/openshot/windows/MainGTK.py", line 1061, in drop_cb
    self.new_transition.animate(distance_from_clip, bottom_y - self.new_transition.get_bounds().y1, 1.0, 0.0, False, 200, 4, goocanvas.ANIMATE_FREEZE)
UnboundLocalError: local variable 'distance_from_clip' referenced before assignment
Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.6/openshot/windows/MainGTK.py", line 1061, in drop_cb
    self.new_transition.animate(distance_from_clip, bottom_y - self.new_transition.get_bounds().y1, 1.0, 0.0, False, 200, 4, goocanvas.ANIMATE_FREEZE)
UnboundLocalError: local variable 'distance_from_clip' referenced before assignment

Xubuntu 10.10, OpenShot 1.2.2 from PPA

Revision history for this message
Vlastimil Ott (vlastimil-e-ott) wrote :

Tried another transitions:

Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.6/openshot/windows/MainGTK.py", line 823, in on_drop_trans_from_tree
    self.drop_cb(self.new_transition, self.tree_drag_context, self.new_transition.get_bounds().x1, 0.0, self.tree_drag_time)
  File "/usr/lib/pymodules/python2.6/openshot/windows/MainGTK.py", line 1061, in drop_cb
    self.new_transition.animate(distance_from_clip, bottom_y - self.new_transition.get_bounds().y1, 1.0, 0.0, False, 200, 4, goocanvas.ANIMATE_FREEZE)
UnboundLocalError: local variable 'distance_from_clip' referenced before assignment
Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.6/openshot/windows/MainGTK.py", line 1061, in drop_cb
    self.new_transition.animate(distance_from_clip, bottom_y - self.new_transition.get_bounds().y1, 1.0, 0.0, False, 200, 4, goocanvas.ANIMATE_FREEZE)
UnboundLocalError: local variable 'distance_from_clip' referenced before assignment
Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.6/openshot/windows/MainGTK.py", line 823, in on_drop_trans_from_tree
    self.drop_cb(self.new_transition, self.tree_drag_context, self.new_transition.get_bounds().x1, 0.0, self.tree_drag_time)
  File "/usr/lib/pymodules/python2.6/openshot/windows/MainGTK.py", line 1061, in drop_cb
    self.new_transition.animate(distance_from_clip, bottom_y - self.new_transition.get_bounds().y1, 1.0, 0.0, False, 200, 4, goocanvas.ANIMATE_FREEZE)
UnboundLocalError: local variable 'distance_from_clip' referenced before assignment
Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.6/openshot/windows/MainGTK.py", line 823, in on_drop_trans_from_tree
    self.drop_cb(self.new_transition, self.tree_drag_context, self.new_transition.get_bounds().x1, 0.0, self.tree_drag_time)
  File "/usr/lib/pymodules/python2.6/openshot/windows/MainGTK.py", line 1061, in drop_cb
    self.new_transition.animate(distance_from_clip, bottom_y - self.new_transition.get_bounds().y1, 1.0, 0.0, False, 200, 4, goocanvas.ANIMATE_FREEZE)
UnboundLocalError: local variable 'distance_from_clip' referenced before assignment
Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.6/openshot/windows/MainGTK.py", line 1061, in drop_cb
    self.new_transition.animate(distance_from_clip, bottom_y - self.new_transition.get_bounds().y1, 1.0, 0.0, False, 200, 4, goocanvas.ANIMATE_FREEZE)
UnboundLocalError: local variable 'distance_from_clip' referenced before assignment
on_frmMain_key_press_event
on_frmMain_destroy

Revision history for this message
Andy Finch (fincha) wrote :

This occurs if you drop a transition to the timeline with the snapping tool not selected. Try enabling the snapping tool and it should work.

Changed in openshot:
status: New → Confirmed
importance: Undecided → High
summary: - Transition clock left to right not added
+ Error dropping transitions to the timeline if the Snapping Tool is off
Changed in openshot:
milestone: none → 1.4.0
Revision history for this message
Berg (emil-berg91) wrote :

Found it weird that no one had fixed this issue yet, so here we go. Patch attached.

Andy Finch (fincha)
Changed in openshot:
status: Confirmed → Fix Committed
Andy Finch (fincha)
Changed in openshot:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.