| 55 | // crashing the frame. |
| 56 | template <typename Fn> |
| 57 | void for_each_target(const UiState& ui, |
| 58 | StageManager& stages, |
| 59 | const BufferModel& model, |
| 60 | Fn&& fn) { |
| 61 | if (ui.link_views()) { |
| 62 | for (std::size_t i = 0; i < model.size(); ++i) { |
| 63 | if (oid::Stage* s = stages.stage_for(i); s != nullptr) { |
| 64 | fn(*s); |
| 65 | } |
| 66 | } |
| 67 | return; |
| 68 | } |
| 69 | |
| 70 | if (oid::Stage* s = stages.selected_stage(ui.selected()); s != nullptr) { |
| 71 | fn(*s); |
| 72 | } |
| 73 | } |
| 74 | |
| 75 | // Combo entries, in order, exactly matching the legacy Qt frontend's |
| 76 | // PixelDisplayFormat/apply_format() (see tag legacy-qt). |
no test coverage detected