Load the view state for a specific slot. If the views are linked, the behavior is different if loading was toggled from the primary, or the separate view (loadOnSeparateView).
| 117 | // Load the view state for a specific slot. If the views are linked, the behavior is different if |
| 118 | // loading was toggled from the primary, or the separate view (loadOnSeparateView). |
| 119 | void ViewStateHandler::loadViewState(int slot, bool loadOnSeparateView) |
| 120 | { |
| 121 | if (slot < 0 || slot >= 8) |
| 122 | // Only eight slots |
| 123 | return; |
| 124 | |
| 125 | if (playbackStateFrameIdx(slot) == -1) |
| 126 | // Slot not valid |
| 127 | return; |
| 128 | |
| 129 | // First load the correct selection |
| 130 | playlist->setSelectedItems(selectionStates[slot][0], selectionStates[slot][1]); |
| 131 | |
| 132 | // Then load the correct frame index |
| 133 | playback->setCurrentFrameAndUpdate(playbackStateFrameIdx(slot)); |
| 134 | |
| 135 | if (loadOnSeparateView) |
| 136 | splitView[1]->setViewState(viewStates[slot].centerOffset, |
| 137 | viewStates[slot].zoomFactor, |
| 138 | viewStates[slot].splittingPoint, |
| 139 | viewStates[slot].viewMode); |
| 140 | else |
| 141 | splitView[0]->setViewState(viewStates[slot].centerOffset, |
| 142 | viewStates[slot].zoomFactor, |
| 143 | viewStates[slot].splittingPoint, |
| 144 | viewStates[slot].viewMode); |
| 145 | } |
| 146 | |
| 147 | void ViewStateHandler::savePlaylist(QDomElement &root) |
| 148 | { |
nothing calls this directly
no test coverage detected