openshot.code team mailing list archive
-
openshot.code team
-
Mailing list archive
-
Message #00015
[Branch ~openshot.code/openshot/main] Rev 510: Fixed bug #829546. Think was caused by one of the changes to use the id of the file when removing...
------------------------------------------------------------
revno: 510
committer: Andy Finch <we.rocked.in79@xxxxxxxxx>
branch nick: openshot
timestamp: Sat 2011-08-20 21:26:15 +0100
message:
Fixed bug #829546. Think was caused by one of the changes to use the id of the file when removing files/folders from projects.
modified:
openshot/windows/MainGTK.py
--
lp:openshot
https://code.launchpad.net/~openshot.code/openshot/main
Your team OpenShot Code is subscribed to branch lp:openshot.
To unsubscribe from this branch go to https://code.launchpad.net/~openshot.code/openshot/main/+edit-subscription
=== modified file 'openshot/windows/MainGTK.py'
--- openshot/windows/MainGTK.py 2011-08-18 21:38:48 +0000
+++ openshot/windows/MainGTK.py 2011-08-20 20:26:15 +0000
@@ -4431,9 +4431,15 @@
for iter in iters:
#remove from the file object
unique_id = self.model.get_value(iter, 4)
- file_item = self.project.project_folder.FindFileByID(unique_id)
- self.model.remove(iter)
- self.project.project_folder.RemoveFile(file_item.name)
+ if unique_id:
+ file_item = self.project.project_folder.FindFileByID(unique_id)
+ self.model.remove(iter)
+ self.project.project_folder.RemoveFile(file_item.name)
+ else:
+ #folders don't have a unique id, so us the name field.
+ filename = self.remove_markup(self.model.get_value(iter, 1))
+ self.model.remove(iter)
+ self.project.project_folder.RemoveFile(filename)
frm.refresh()
else: