mirror of
https://gitlab.com/gabmus/envision.git
synced 2025-08-03 22:58:44 +00:00
chore: add comment around restore profile selection
This commit is contained in:
parent
5630091179
commit
1b405bc06b
1 changed files with 4 additions and 0 deletions
|
@ -246,6 +246,10 @@ impl SimpleComponent for MainView {
|
||||||
}
|
}
|
||||||
MainViewMsg::UpdateProfileNames(names, config) => {
|
MainViewMsg::UpdateProfileNames(names, config) => {
|
||||||
self.set_profile_names(names);
|
self.set_profile_names(names);
|
||||||
|
// why send another message to set the dropdown selection?
|
||||||
|
// set_* from tracker likely updates the view obj in the next
|
||||||
|
// draw, so selecting here will result in nothing cause the
|
||||||
|
// dropdown is effectively empty
|
||||||
sender.input(MainViewMsg::SetSelectedProfile({
|
sender.input(MainViewMsg::SetSelectedProfile({
|
||||||
let pos = self.profile_names.iter()
|
let pos = self.profile_names.iter()
|
||||||
.position(|p| p.clone() == config.selected_profile_name);
|
.position(|p| p.clone() == config.selected_profile_name);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue