| 1401 | } |
| 1402 | |
| 1403 | void splitViewWidget::currentSelectedItemsChanged(playlistItem *item1, playlistItem *item2) |
| 1404 | { |
| 1405 | Q_ASSERT_X(this->isMasterView, Q_FUNC_INFO, "Call this function only on the primary widget."); |
| 1406 | |
| 1407 | if (!item1 && !item2) |
| 1408 | return; |
| 1409 | |
| 1410 | QSettings settings; |
| 1411 | bool savePositionAndZoomPerItem = settings.value("SavePositionAndZoomPerItem", false).toBool(); |
| 1412 | if (savePositionAndZoomPerItem) |
| 1413 | { |
| 1414 | // Restore the zoom and position which was saved in the playlist item |
| 1415 | const bool getOtherViewValuesFromOtherSlot = !enableLink; |
| 1416 | if (item1) |
| 1417 | { |
| 1418 | item1->getZoomAndPosition(this->moveOffset, this->zoomFactor, false); |
| 1419 | item1->getZoomAndPosition(this->getOtherWidget()->moveOffset, |
| 1420 | this->getOtherWidget()->zoomFactor, |
| 1421 | getOtherViewValuesFromOtherSlot); |
| 1422 | } |
| 1423 | else if (item2) |
| 1424 | { |
| 1425 | item2->getZoomAndPosition(moveOffset, this->zoomFactor, false); |
| 1426 | item2->getZoomAndPosition(this->getOtherWidget()->moveOffset, |
| 1427 | this->getOtherWidget()->zoomFactor, |
| 1428 | getOtherViewValuesFromOtherSlot); |
| 1429 | } |
| 1430 | DEBUG_LOAD_DRAW("splitViewWidget::currentSelectedItemsChanged restore from item " |
| 1431 | << item1->properties().id << " moveOffset " << this->moveOffset << " zoom " |
| 1432 | << this->zoomFactor); |
| 1433 | } |
| 1434 | } |
| 1435 | |
| 1436 | QImage splitViewWidget::getScreenshot(bool fullItem) |
| 1437 | { |
nothing calls this directly
no test coverage detected