Răsfoiți Sursa

fix close window bug

David Rose 22 ani în urmă
părinte
comite
9242d5f932
1 a modificat fișierele cu 2 adăugiri și 2 ștergeri
  1. 2 2
      panda/src/framework/pandaFramework.cxx

+ 2 - 2
panda/src/framework/pandaFramework.cxx

@@ -835,7 +835,7 @@ event_esc(CPT_Event event, void *data) {
     self->remove_mouse(win);
     self->remove_mouse(win);
 
 
     // If we closed the last window, shut down.
     // If we closed the last window, shut down.
-    if (self->_windows.empty()) {
+    if (self->all_windows_closed()) {
       self->_exit_flag = true;
       self->_exit_flag = true;
     }
     }
   }
   }
@@ -1307,7 +1307,7 @@ event_window_event(CPT_Event event, void *data) {
         self->remove_mouse(win);
         self->remove_mouse(win);
 
 
         // If the last window was closed, exit the application.
         // If the last window was closed, exit the application.
-        if (self->_windows.empty() && !self->_exit_flag) {
+        if (self->all_windows_closed() && !self->_exit_flag) {
           framework_cat.info()
           framework_cat.info()
             << "Last window was closed by user.\n";
             << "Last window was closed by user.\n";
           self->_exit_flag = true;
           self->_exit_flag = true;