File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -228,6 +228,7 @@ impl DashboardEditorDialog {
228228 if let Some ( slot) = self . config . slots . get ( idx) {
229229 let label = Self :: slot_label ( slot) ;
230230 let mut open = true ;
231+ let mut should_close = false ;
231232 egui:: Window :: new ( "Confirm remove" )
232233 . collapsible ( false )
233234 . resizable ( false )
@@ -237,13 +238,16 @@ impl DashboardEditorDialog {
237238 ui. horizontal ( |ui| {
238239 if ui. button ( "Remove" ) . clicked ( ) {
239240 confirm_remove = Some ( idx) ;
240- open = false ;
241+ should_close = true ;
241242 }
242243 if ui. button ( "Cancel" ) . clicked ( ) {
243- open = false ;
244+ should_close = true ;
244245 }
245246 } ) ;
246247 } ) ;
248+ if should_close {
249+ open = false ;
250+ }
247251 if !open {
248252 self . confirm_remove_slot = None ;
249253 }
@@ -255,7 +259,7 @@ impl DashboardEditorDialog {
255259 while idx < self . config . slots . len ( ) {
256260 let original_slot = self . config . slots [ idx] . clone ( ) ;
257261 let mut slot = original_slot. clone ( ) ;
258- let mut removed = confirm_remove == Some ( idx) ;
262+ let removed = confirm_remove == Some ( idx) ;
259263 let mut edited = false ;
260264 let mut swapped = false ;
261265 ui. push_id ( idx, |ui| {
You can’t perform that action at this time.
0 commit comments