mirror of
https://gitlab.com/gabmus/envision.git
synced 2025-08-04 07:08:53 +00:00
fix: negative logic and early return in start xrservice func
This commit is contained in:
parent
2217f84ff4
commit
3f846b26e0
1 changed files with 51 additions and 51 deletions
|
@ -163,7 +163,17 @@ impl App {
|
|||
pub fn start_xrservice(&mut self, sender: AsyncComponentSender<Self>, debug: bool) {
|
||||
self.xrservice_ready = false;
|
||||
let prof = self.get_selected_profile();
|
||||
if prof.can_start() {
|
||||
if !prof.can_start() {
|
||||
alert(
|
||||
"Failed to start profile",
|
||||
Some(concat!(
|
||||
"You need to build the current profile before starting it.",
|
||||
"\n\nYou can do this from the menu."
|
||||
)),
|
||||
Some(&self.app_win.clone().upcast::<gtk::Window>()),
|
||||
);
|
||||
return;
|
||||
}
|
||||
if let Err(e) = set_current_active_runtime_to_profile(&prof) {
|
||||
alert(
|
||||
"Failed to start XR Service",
|
||||
|
@ -213,16 +223,6 @@ impl App {
|
|||
.emit(DebugViewMsg::XRServiceActiveChanged(true));
|
||||
self.set_inhibit_session(true);
|
||||
sender.input(Msg::StartProber);
|
||||
} else {
|
||||
alert(
|
||||
"Failed to start profile",
|
||||
Some(concat!(
|
||||
"You need to build the current profile before starting it.",
|
||||
"\n\nYou can do this from the menu."
|
||||
)),
|
||||
Some(&self.app_win.clone().upcast::<gtk::Window>()),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
pub fn run_autostart(&mut self, sender: AsyncComponentSender<Self>) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue