| 281 | if (auto* page = TopPage()) |
| 282 | { |
| 283 | if (page->OnButtonClicked(*this, idc)) |
| 284 | return; |
| 285 | } |
| 286 | // Intercept the dialog-exit IDCs the base ControlsContainer would |
| 287 | // turn into an immediate Exit(idc). Defer the Exit until the |
| 288 | // notebook close animation has finished — see BeginCloseAnim. |
| 289 | if (idc == IDC_OK || idc == IDC_CANCEL) |
| 290 | { |
| 291 | BeginCloseAnim(idc); |
| 292 | return; |
| 293 | } |
| 294 | Display::OnButtonClicked(idc); |
| 295 | } |
| 296 | |
| 297 | void OptionsShell::BeginCloseAnim(int exitIdc) |
| 298 | { |
| 299 | // If we're already mid-close (defensive — could happen if a page |
| 300 | // forwards a second Cancel during the animation), don't restart it. |
| 301 | if (_exitWhenClose >= 0) |
nothing calls this directly
no test coverage detected