| 11686 | } |
| 11687 | |
| 11688 | void |
| 11689 | InspectorNode::refreshActiveInputs(int inputNbChanged, |
| 11690 | bool isASide) |
| 11691 | { |
| 11692 | assert( QThread::currentThread() == qApp->thread() ); |
| 11693 | NodePtr inputNode = getRealInput(inputNbChanged); |
| 11694 | { |
| 11695 | QMutexLocker l(&_activeInputsMutex); |
| 11696 | if (!inputNode) { |
| 11697 | ///check if the input was one of the active ones if so set to -1 |
| 11698 | if (_activeInputs[0] == inputNbChanged) { |
| 11699 | _activeInputs[0] = -1; |
| 11700 | } else if (_activeInputs[1] == inputNbChanged) { |
| 11701 | _activeInputs[1] = -1; |
| 11702 | } |
| 11703 | } else { |
| 11704 | if ( !isASide && (_activeInputs[0] != -1) ) { |
| 11705 | ViewerInstance* isViewer = isEffectViewer(); |
| 11706 | if (isViewer) { |
| 11707 | OpenGLViewerI* viewerUI = isViewer->getUiContext(); |
| 11708 | if (viewerUI) { |
| 11709 | ViewerCompositingOperatorEnum op = viewerUI->getCompositingOperator(); |
| 11710 | if (op == eViewerCompositingOperatorNone) { |
| 11711 | viewerUI->setCompositingOperator(eViewerCompositingOperatorWipeUnder); |
| 11712 | } |
| 11713 | } |
| 11714 | } |
| 11715 | _activeInputs[1] = inputNbChanged; |
| 11716 | } else { |
| 11717 | _activeInputs[0] = inputNbChanged; |
| 11718 | if (_activeInputs[1] == -1) { |
| 11719 | _activeInputs[1] = inputNbChanged; |
| 11720 | } |
| 11721 | } |
| 11722 | } |
| 11723 | } |
| 11724 | Q_EMIT activeInputsChanged(); |
| 11725 | Q_EMIT refreshOptionalState(); |
| 11726 | } |
| 11727 | |
| 11728 | int |
| 11729 | InspectorNode::getPreferredInputInternal(bool connected) const |
no test coverage detected