Ticket #450 (closed defect: fixed)
In sequencer, check that selection is not None before merge/create
| Reported by: | user | Owned by: | somebody |
|---|---|---|---|
| Priority: | minor | Milestone: | |
| Component: | aldrin | Version: | SVN Trunk |
| Keywords: | sequencer, merge, selection | Cc: | jamesmichaelmcdermott@… |
Description
In sequencer, I right-clicked a pattern and said "Create pattern from selection". I hadn't selected anything. This error on the terminal:
Traceback (most recent call last):
File "/usr/local/bin/../share/aldrin/sequencer.py", line 504, in on_popup_create_pattern
start = (min(self.selection_start[0], self.selection_end[0]),
TypeError: 'NoneType' object is unsubscriptable
Same with "Merge selected patterns":
Traceback (most recent call last):
File "/usr/local/bin/../share/aldrin/sequencer.py", line 524, in on_popup_merge
start = (min(self.selection_start[0], self.selection_end[0]),
TypeError: 'NoneType' object is unsubscriptable
Attached patch: 1. greys out the menu items if there is no selection and 2. does a try/catch in the merge/create functions to avoid the errors, just in case they're ever called from anywhere else.
Attachments
Change History
Note: See
TracTickets for help on using
tickets.
