Merge branch 'dev' into spot-removal-tool (#2239)

This commit is contained in:
Hombre
2018-01-25 20:41:10 +01:00
183 changed files with 9182 additions and 5571 deletions

View File

@@ -516,7 +516,52 @@ int refreshmap[rtengine::NUMOFEVENTS] = {
DARKFRAME, // EvLensCorrLensfunLens
ALLNORAW, // EvTMFattalEnabled
HDR, // EvTMFattalThreshold
HDR // EvTMFattalAmount
HDR, // EvTMFattalAmount
ALLNORAW, // EvWBEnabled
RGBCURVE, // EvRGBEnabled
LUMINANCECURVE, // EvLEnabled
DEMOSAIC // EvPixelShiftOneGreen
};
namespace rtengine {
RefreshMapper::RefreshMapper():
next_event_(rtengine::NUMOFEVENTS)
{
for (int event = 0; event < rtengine::NUMOFEVENTS; ++event) {
actions_[event] = refreshmap[event];
}
}
ProcEvent RefreshMapper::newEvent()
{
return ProcEvent(++next_event_);
}
void RefreshMapper::mapEvent(ProcEvent event, int action)
{
actions_[event] = action;
}
int RefreshMapper::getAction(ProcEvent event) const
{
auto it = actions_.find(event);
if (it == actions_.end()) {
return 0;
} else {
return it->second;
}
}
RefreshMapper *RefreshMapper::getInstance()
{
static RefreshMapper instance;
return &instance;
}
} // namespace rtengine