A bugfix in deleting a timeline

This commit is contained in:
Manuel Cortez 2015-02-12 10:35:13 -06:00
parent de7118caf4
commit d4ea961dae
2 changed files with 6 additions and 1 deletions

View File

@ -220,8 +220,12 @@ class baseBufferController(bufferController):
if dlg == widgetUtils.YES:
if self.name[:9] in self.session.settings["other_buffers"]["timelines"]:
self.session.settings["other_buffers"]["timelines"].remove(self.name[:9])
return True
elif dlg == widgetUtils.NO:
return False
else:
output.speak(_(u"This buffer is not a timeline; it can't be deleted."))
return False
def put_items_on_list(self, number_of_items):
log.debug("The list contains %d items " % (self.buffer.list.get_count(),))

View File

@ -575,7 +575,8 @@ class Controller(object):
buffer = self.get_current_buffer()
if not hasattr(buffer, "account"): return
buff = self.view.search(buffer.name, buffer.account)
buffer.remove_buffer()
answer = buffer.remove_buffer()
if answer == False: return
self.view.delete_buffer(buff)
buffer.session.sound.play("delete_timeline.ogg")
self.buffers.remove(buffer)