fix: default new images to Auto and fix organ selection not being saved - #32
Open
gwado wants to merge 2 commits into
Open
fix: default new images to Auto and fix organ selection not being saved#32gwado wants to merge 2 commits into
gwado wants to merge 2 commits into
Conversation
The organ (Leaf, Flower, ...) for each added image was only changeable through a discreet "edit" icon on its thumbnail, easy to miss - most users likely never noticed they could/should set it. The organ picker dialog now opens immediately after each image is added (sequentially, for multi-image imports), pre-selected on "Auto" (matching the picker dialog's own existing default). The "edit" icon on each thumbnail is kept as a secondary way to change it afterwards. Fixed along the way: the "edit" picker's selection was never written back to imageModel, only to the delegate's local mainText - so the picked organ never actually reached identifyPlant(), which always read the model's original value. Both the new picker-on-add flow and the edit picker now write through imageModel.setProperty(index, "organ", ...). Also: Dialogs.qml's organ RadioButtons never showed the default/current selection as checked (only tracked internally) - added the missing `checked` binding so the picker visibly reflects it. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Reconsidered after review: prompting for the organ right after adding every single image (and chaining the dialogs for multi-image imports) is more friction than it's worth for the common case of a user who just trusts Pl@ntNet's automatic organ detection. The actual problem worth solving was discoverability of the edit option, not forcing a choice on every photo. New images default to Auto silently again; the "edit" icon on each thumbnail remains the way to change it, with its persistence bug fix and the picker's visible default-selection fix from the previous commit both kept. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
mainTextdisplay, never the actualimageModelentry — so whatever organ the user picked in that dialog never actually reachedidentifyPlant(), which always read the model's original default value. Fixed by writing throughimageModel.setProperty(index, "organ", ...).Dialogs.qml) never visually showed which option was selected (noRadioButton.checkedbinding), even though it did track a default internally. Added the missing binding so "Auto" now shows as checked when the dialog opens.Auto(previously defaulted toLeaf, inconsistently with the picker dialog's own default).Type of change
Bug fix
Test plan
clickable build --arch arm64builds cleanly; the produced package passesclickable's click-review.Notes