From 97d300bbc09287a2b28b5dd51f60f083802a211c Mon Sep 17 00:00:00 2001 From: Arthur Moore Date: Sat, 17 Jan 2015 03:39:51 -0500 Subject: [PATCH] Remove even more unneeded complex if statements --- src/wx/cmdevents.cpp | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/src/wx/cmdevents.cpp b/src/wx/cmdevents.cpp index 8b0e28de..13cbcb0b 100644 --- a/src/wx/cmdevents.cpp +++ b/src/wx/cmdevents.cpp @@ -2002,12 +2002,13 @@ EVT_HANDLER_MASK(ChangeFilter, "Change Pixel Filter", CMDEN_NREC_ANY) int filt = gopts.filter; if(filt == FF_PLUGIN || ++gopts.filter == FF_PLUGIN && gopts.filter_plugin.empty()) - gopts.filter = 0; + { + gopts.filter = 0; + } update_opts(); - if(panel->panel && - builtin_ff_scale(filt) != builtin_ff_scale(gopts.filter)) { - panel->panel->Delete(); - panel->panel = NULL; + if(panel->panel) { + panel->panel->Delete(); + panel->panel = NULL; } } @@ -2015,14 +2016,10 @@ EVT_HANDLER_MASK(ChangeIFB, "Change Interframe Blending", CMDEN_NREC_ANY) { gopts.ifb = (gopts.ifb + 1) % 3; update_opts(); - if(panel->panel && - // ifb doesn't support 24-bit - (gopts.ifb != IFB_NONE && systemColorDepth == 24) || - // standard prefers 24-bit - (gopts.ifb == IFB_NONE && gopts.filter == FF_NONE && - systemColorDepth == 32 && gopts.render_method == 0)) { - panel->panel->Delete(); - panel->panel = NULL; + if(panel->panel) + { + panel->panel->Delete(); + panel->panel = NULL; } }