| 3089 | } |
| 3090 | |
| 3091 | void |
| 3092 | ViewerInstance::onColorSpaceChanged(ViewerColorSpaceEnum colorspace) |
| 3093 | { |
| 3094 | // always running in the main thread |
| 3095 | assert( qApp && qApp->thread() == QThread::currentThread() ); |
| 3096 | |
| 3097 | { |
| 3098 | QMutexLocker l(&_imp->viewerParamsMutex); |
| 3099 | if (_imp->viewerParamsLut == colorspace) { |
| 3100 | return; |
| 3101 | } |
| 3102 | _imp->viewerParamsLut = colorspace; |
| 3103 | } |
| 3104 | assert(_imp->uiContext); |
| 3105 | if ( ( (_imp->uiContext->getBitDepth() == eImageBitDepthByte) ) |
| 3106 | && !getApp()->getProject()->isLoadingProject() ) { |
| 3107 | renderCurrentFrame(true); |
| 3108 | } else { |
| 3109 | _imp->uiContext->redraw(); |
| 3110 | } |
| 3111 | } |
| 3112 | |
| 3113 | void |
| 3114 | ViewerInstance::setDisplayChannels(DisplayChannelsEnum channels, |
no test coverage detected