CascadesCarnivoreProject / Carnassial

Carnassial: Simplifying Remote Camera Data
Other
3 stars 0 forks source link

Timelapse UX: crash on invalid ImageFilter value inserted by DataEntryChoice #124

Closed twest820 closed 8 years ago

twest820 commented 8 years ago

DataEntryChoice..ctor() has

        // Add a separator and an empty field to the list, so the user can return it to an empty state. Note that this means ImageQuality can also be empty.. not sure if this is a good thing
        this.ContentControl.Items.Add(new Separator());
        this.ContentControl.Items.Add(String.Empty);
        this.ContentControl.SelectedIndex = 0;

which produces an exception from Enum.Parse() if a user selects the empty item in the dropdown.

twest820 commented 8 years ago

It should be clear, from the title and description, this issue is specific to the Enum.Parse() under the ImageQuality control.

As Timelapse doesn't perform dynamic code generation I'm unsure why it would be expected Enum.Parse() would be invoked for other choice controls. DateTime, UtcOffset, and to some extent ImageQuality are currently the only typed columns in the database layer.

saulgreenberg commented 8 years ago

Note: While this issue is completed, I am leaving it open for now as I am unable to push it to the Repo due to authorization issues.

Fixed, along with updated UI for indicating whether choice menus should include an empty item.

-Editor: Choice Editor now includes option to add (or not add) an empty item. I should note that this feature was actually requested by a user, as she wanted some of the choice menus to be forced choice (i.e., a non-empty option had to be selected) and others to allow for no choices to be made (i.e., where items could be cleared)

-Editor: Choice Editor Topmost also adjusted to behave well, where it was formerly appearing atop of other application windows if a user switched applications.

-Timeplapse: modified to examine choice list for empty item and behave accordingly

Backwards compatibility issue: Old templates will no longer show empty items. They must be modifed if users now want to include empty items.