mirror of
https://gitlab.com/gabmus/envision.git
synced 2025-04-20 03:24: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,
|
||||
enable_debug_view: bool,
|
||||
profiles: Vec<Profile>,
|
||||
#[no_eq]
|
||||
selected_profile: Profile,
|
||||
#[tracker::do_not_track]
|
||||
profiles_dropdown: Option<gtk::DropDown>,
|
||||
|
@ -60,7 +61,6 @@ pub enum MainViewMsg {
|
|||
SetSelectedProfile(u32),
|
||||
ProfileSelected(u32),
|
||||
UpdateSelectedProfile(Profile),
|
||||
MarkChanged,
|
||||
EditProfile,
|
||||
CreateProfile,
|
||||
DeleteProfile,
|
||||
|
@ -384,8 +384,8 @@ impl SimpleComponent for MainView {
|
|||
set_margin_end: 12,
|
||||
set_halign: gtk::Align::Start,
|
||||
set_label: "Refresh",
|
||||
connect_clicked[sender] => move |_| {
|
||||
sender.input(Self::Input::MarkChanged);
|
||||
connect_clicked[sender, profiles_dropdown] => move |_| {
|
||||
sender.input(Self::Input::SetSelectedProfile(profiles_dropdown.selected()));
|
||||
}
|
||||
},
|
||||
},
|
||||
|
@ -562,9 +562,6 @@ impl SimpleComponent for MainView {
|
|||
.sender()
|
||||
.emit(InstallWivrnBoxMsg::UpdateSelectedProfile(prof.clone()));
|
||||
}
|
||||
Self::Input::MarkChanged => {
|
||||
self.mark_all_changed();
|
||||
}
|
||||
Self::Input::UpdateProfiles(profiles, config) => {
|
||||
self.set_profiles(profiles);
|
||||
// why send another message to set the dropdown selection?
|
||||
|
|
Loading…
Add table
Reference in a new issue