! * called when the current item in the list view was changed, * triggers the navigation to the corresponding worksheet. */
| 130 | * triggers the navigation to the corresponding worksheet. |
| 131 | */ |
| 132 | void WorksheetPreviewWidget::currentChanged(int index) { |
| 133 | if (m_suppressNavigate) |
| 134 | return; |
| 135 | |
| 136 | const auto& worksheets = m_project->children<Worksheet>(AbstractAspect::ChildIndexFlag::Recursive); |
| 137 | const auto* worksheet = worksheets.at(index); |
| 138 | m_project->requestNavigateTo(worksheet->path()); |
| 139 | } |
| 140 | |
| 141 | void WorksheetPreviewWidget::aspectAdded(const AbstractAspect* aspect) { |
| 142 | if (m_project->isLoading()) |