| 1009 | } |
| 1010 | |
| 1011 | void ProjectWindow::OnIconize(wxIconizeEvent &event) |
| 1012 | { |
| 1013 | //JKC: On Iconizing we get called twice. Don't know |
| 1014 | // why but it does no harm. |
| 1015 | // Should we be returning true/false rather than |
| 1016 | // void return? I don't know. |
| 1017 | mIconized = event.IsIconized(); |
| 1018 | |
| 1019 | #if defined(__WXMAC__) |
| 1020 | // Readdresses bug 1431 since a crash could occur when restoring iconized |
| 1021 | // floating toolbars due to recursion (bug 2411). |
| 1022 | MacShowUndockedToolbars(!mIconized); |
| 1023 | if( !mIconized ) |
| 1024 | { |
| 1025 | Raise(); |
| 1026 | } |
| 1027 | #endif |
| 1028 | |
| 1029 | // VisibileProjectCount seems to be just a counter for debugging. |
| 1030 | // It's not used outside this function. |
| 1031 | auto VisibleProjectCount = std::count_if( |
| 1032 | AllProjects{}.begin(), AllProjects{}.end(), |
| 1033 | []( const AllProjects::value_type &ptr ){ |
| 1034 | return !GetProjectFrame( *ptr ).IsIconized(); |
| 1035 | } |
| 1036 | ); |
| 1037 | event.Skip(); |
| 1038 | |
| 1039 | // This step is to fix part of Bug 2040, where the BackingPanel |
| 1040 | // size was not restored after we leave Iconized state. |
| 1041 | |
| 1042 | // Queue up a resize event using OnShow so that we |
| 1043 | // refresh the track panel. But skip this, if we're iconized. |
| 1044 | if( mIconized ) |
| 1045 | return; |
| 1046 | wxShowEvent Evt; |
| 1047 | OnShow( Evt ); |
| 1048 | } |
| 1049 | |
| 1050 | void ProjectWindow::OnMove(wxMoveEvent & event) |
| 1051 | { |
nothing calls this directly
no test coverage detected