Add a checkbox to quit on disconnect
This commit is contained in:
+7
-3
@@ -211,8 +211,12 @@ impl ApplicationHandler<UserEvent> for Application {
|
||||
);
|
||||
self.open(event_loop, Box::new(p2));
|
||||
}
|
||||
UserEvent::Quit => {
|
||||
event_loop.exit();
|
||||
UserEvent::Quit(sim_id) => {
|
||||
self.viewports
|
||||
.retain(|_, viewport| viewport.app.sim_id() != sim_id);
|
||||
if !self.viewports.contains_key(&ViewportId::ROOT) {
|
||||
event_loop.exit();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -401,7 +405,7 @@ pub enum UserEvent {
|
||||
OpenDebugger(SimId),
|
||||
OpenInput,
|
||||
OpenPlayer2,
|
||||
Quit,
|
||||
Quit(SimId),
|
||||
}
|
||||
|
||||
pub enum Action {
|
||||
|
||||
Reference in New Issue
Block a user