| 1847 | } |
| 1848 | |
| 1849 | void |
| 1850 | InspectorNode::refreshActiveInputs(int inputNbChanged, |
| 1851 | bool isASide) |
| 1852 | { |
| 1853 | assert( QThread::currentThread() == qApp->thread() ); |
| 1854 | NodePtr inputNode = getRealInput(inputNbChanged); |
| 1855 | { |
| 1856 | QMutexLocker l(&_activeInputsMutex); |
| 1857 | if (!inputNode) { |
| 1858 | ///check if the input was one of the active ones if so set to -1 |
| 1859 | if (_activeInputs[0] == inputNbChanged) { |
| 1860 | _activeInputs[0] = -1; |
| 1861 | } else if (_activeInputs[1] == inputNbChanged) { |
| 1862 | _activeInputs[1] = -1; |
| 1863 | } |
| 1864 | } else { |
| 1865 | if ( !isASide && (_activeInputs[0] != -1) ) { |
| 1866 | ViewerInstance* isViewer = isEffectViewer(); |
| 1867 | if (isViewer) { |
| 1868 | OpenGLViewerI* viewerUI = isViewer->getUiContext(); |
| 1869 | if (viewerUI) { |
| 1870 | ViewerCompositingOperatorEnum op = viewerUI->getCompositingOperator(); |
| 1871 | if (op == eViewerCompositingOperatorNone) { |
| 1872 | viewerUI->setCompositingOperator(eViewerCompositingOperatorWipeUnder); |
| 1873 | } |
| 1874 | } |
| 1875 | } |
| 1876 | _activeInputs[1] = inputNbChanged; |
| 1877 | } else { |
| 1878 | _activeInputs[0] = inputNbChanged; |
| 1879 | if (_activeInputs[1] == -1) { |
| 1880 | _activeInputs[1] = inputNbChanged; |
| 1881 | } |
| 1882 | } |
| 1883 | } |
| 1884 | } |
| 1885 | Q_EMIT activeInputsChanged(); |
| 1886 | Q_EMIT refreshOptionalState(); |
| 1887 | } |
| 1888 | |
| 1889 | int |
| 1890 | InspectorNode::getPreferredInputInternal(bool connected) const |
no test coverage detected