mirror of
https://gitlab.com/gabmus/envision.git
synced 2025-08-03 06:38:52 +00:00
fix: unexpected behavior on gpu profile refresh button
This commit is contained in:
parent
a71359e800
commit
a58f920d3b
1 changed files with 3 additions and 6 deletions
|
@ -30,6 +30,7 @@ pub struct MainView {
|
||||||
xrservice_active: bool,
|
xrservice_active: bool,
|
||||||
enable_debug_view: bool,
|
enable_debug_view: bool,
|
||||||
profiles: Vec<Profile>,
|
profiles: Vec<Profile>,
|
||||||
|
#[no_eq]
|
||||||
selected_profile: Profile,
|
selected_profile: Profile,
|
||||||
#[tracker::do_not_track]
|
#[tracker::do_not_track]
|
||||||
profiles_dropdown: Option<gtk::DropDown>,
|
profiles_dropdown: Option<gtk::DropDown>,
|
||||||
|
@ -60,7 +61,6 @@ pub enum MainViewMsg {
|
||||||
SetSelectedProfile(u32),
|
SetSelectedProfile(u32),
|
||||||
ProfileSelected(u32),
|
ProfileSelected(u32),
|
||||||
UpdateSelectedProfile(Profile),
|
UpdateSelectedProfile(Profile),
|
||||||
MarkChanged,
|
|
||||||
EditProfile,
|
EditProfile,
|
||||||
CreateProfile,
|
CreateProfile,
|
||||||
DeleteProfile,
|
DeleteProfile,
|
||||||
|
@ -384,8 +384,8 @@ impl SimpleComponent for MainView {
|
||||||
set_margin_end: 12,
|
set_margin_end: 12,
|
||||||
set_halign: gtk::Align::Start,
|
set_halign: gtk::Align::Start,
|
||||||
set_label: "Refresh",
|
set_label: "Refresh",
|
||||||
connect_clicked[sender] => move |_| {
|
connect_clicked[sender, profiles_dropdown] => move |_| {
|
||||||
sender.input(Self::Input::MarkChanged);
|
sender.input(Self::Input::SetSelectedProfile(profiles_dropdown.selected()));
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -562,9 +562,6 @@ impl SimpleComponent for MainView {
|
||||||
.sender()
|
.sender()
|
||||||
.emit(InstallWivrnBoxMsg::UpdateSelectedProfile(prof.clone()));
|
.emit(InstallWivrnBoxMsg::UpdateSelectedProfile(prof.clone()));
|
||||||
}
|
}
|
||||||
Self::Input::MarkChanged => {
|
|
||||||
self.mark_all_changed();
|
|
||||||
}
|
|
||||||
Self::Input::UpdateProfiles(profiles, config) => {
|
Self::Input::UpdateProfiles(profiles, config) => {
|
||||||
self.set_profiles(profiles);
|
self.set_profiles(profiles);
|
||||||
// why send another message to set the dropdown selection?
|
// why send another message to set the dropdown selection?
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue