summaryrefslogtreecommitdiff
path: root/xfa/fwl/core/ifwl_checkbox.cpp
diff options
context:
space:
mode:
authordsinclair <dsinclair@chromium.org>2016-11-17 09:26:13 -0800
committerCommit bot <commit-bot@chromium.org>2016-11-17 09:26:13 -0800
commita43715b4cefc982baadd45510db8c4e428c2c8cd (patch)
tree205b3b262b7b9bbf07595bf7ebb7aac876713650 /xfa/fwl/core/ifwl_checkbox.cpp
parent4905c9f0474f4fc0a85f05d0eb8c34fb099a77f2 (diff)
downloadpdfium-a43715b4cefc982baadd45510db8c4e428c2c8cd.tar.xz
Convert single use EventTypes to class files.
This moves the remaining EventType class definitions to there own files where the EventType only has a single implementation. Review-Url: https://codereview.chromium.org/2508203002
Diffstat (limited to 'xfa/fwl/core/ifwl_checkbox.cpp')
-rw-r--r--xfa/fwl/core/ifwl_checkbox.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/xfa/fwl/core/ifwl_checkbox.cpp b/xfa/fwl/core/ifwl_checkbox.cpp
index 62bf636796..1f053dbe20 100644
--- a/xfa/fwl/core/ifwl_checkbox.cpp
+++ b/xfa/fwl/core/ifwl_checkbox.cpp
@@ -10,6 +10,7 @@
#include "third_party/base/ptr_util.h"
#include "xfa/fde/tto/fde_textout.h"
+#include "xfa/fwl/core/cfwl_evtcheckstatechanged.h"
#include "xfa/fwl/core/cfwl_msgkey.h"
#include "xfa/fwl/core/cfwl_msgmouse.h"
#include "xfa/fwl/core/cfwl_themebackground.h"
@@ -360,11 +361,12 @@ void IFWL_CheckBox::NextStates() {
}
Repaint(&m_rtClient);
- if (dwFirststate != m_pProperties->m_dwStates) {
- CFWL_EvtCkbCheckStateChanged wmCheckBoxState;
- wmCheckBoxState.m_pSrcTarget = this;
- DispatchEvent(&wmCheckBoxState);
- }
+ if (dwFirststate == m_pProperties->m_dwStates)
+ return;
+
+ CFWL_EvtCheckStateChanged wmCheckBoxState;
+ wmCheckBoxState.m_pSrcTarget = this;
+ DispatchEvent(&wmCheckBoxState);
}
void IFWL_CheckBox::OnProcessMessage(CFWL_Message* pMessage) {