added a more flexible way of managing ProcEvents
modifying the global ProcEvent enum and refreshmap array is not needed anymore. You can now register new events dynamically, using a ProcEventMapper instance. See rtgui/localcontrast.cc for an example. Hopefully this solves the problem of recurring merge conflicts when different devs add different proc events
This commit is contained in:
@@ -315,7 +315,7 @@ void ToolPanelCoordinator::panelChanged (rtengine::ProcEvent event, const Glib::
|
||||
return;
|
||||
}
|
||||
|
||||
int changeFlags = refreshmap[ (int)event];
|
||||
int changeFlags = rtengine::RefreshMapper::getInstance()->getAction(event);
|
||||
|
||||
ProcParams* params = ipc->beginUpdateParams ();
|
||||
|
||||
@@ -327,7 +327,7 @@ void ToolPanelCoordinator::panelChanged (rtengine::ProcEvent event, const Glib::
|
||||
if (event == rtengine::EvCTHFlip || event == rtengine::EvCTVFlip) {
|
||||
if (fabs (params->rotate.degree) > 0.001) {
|
||||
params->rotate.degree *= -1;
|
||||
changeFlags |= refreshmap[ (int)rtengine::EvROTDegree];
|
||||
changeFlags |= rtengine::RefreshMapper::getInstance()->getAction(rtengine::EvROTDegree);
|
||||
rotate->read (params);
|
||||
}
|
||||
}
|
||||
@@ -446,7 +446,7 @@ void ToolPanelCoordinator::profileChange (const PartialProfile *nparams, rtengi
|
||||
|
||||
// start the IPC processing
|
||||
if (filterRawRefresh) {
|
||||
ipc->endUpdateParams ( refreshmap[ (int)event] & ALLNORAW );
|
||||
ipc->endUpdateParams ( rtengine::RefreshMapper::getInstance()->getAction(event) & ALLNORAW );
|
||||
} else {
|
||||
ipc->endUpdateParams (event);
|
||||
}
|
||||
|
Reference in New Issue
Block a user