| Index: fpdfsdk/src/formfiller/FFL_ComboBox.cpp
|
| diff --git a/fpdfsdk/src/formfiller/FFL_ComboBox.cpp b/fpdfsdk/src/formfiller/FFL_ComboBox.cpp
|
| index d3a494405f9f919f961673cf82183a8332a50a9f..025a4a9ac955205d7c010b549ba012572dc3af1b 100644
|
| --- a/fpdfsdk/src/formfiller/FFL_ComboBox.cpp
|
| +++ b/fpdfsdk/src/formfiller/FFL_ComboBox.cpp
|
| @@ -85,30 +85,18 @@ FX_BOOL CFFL_ComboBox::OnChar(CPDFSDK_Annot* pAnnot, FX_UINT nChar, FX_UINT nFla
|
|
|
| FX_BOOL CFFL_ComboBox::IsDataChanged(CPDFSDK_PageView* pPageView)
|
| {
|
| - if (CPWL_ComboBox * pWnd = (CPWL_ComboBox*)GetPDFWindow(pPageView, FALSE))
|
| - {
|
| - int32_t nCurSel = pWnd->GetSelect();
|
| + CPWL_ComboBox* pWnd = (CPWL_ComboBox*)GetPDFWindow(pPageView, FALSE);
|
| + if (!pWnd)
|
| + return FALSE;
|
|
|
| - ASSERT(m_pWidget != NULL);
|
| + int32_t nCurSel = pWnd->GetSelect();
|
| + if (!(m_pWidget->GetFieldFlags() & FIELDFLAG_EDIT))
|
| + return nCurSel != m_pWidget->GetSelectedIndex(0);
|
|
|
| - if (m_pWidget->GetFieldFlags() & FIELDFLAG_EDIT)
|
| - {
|
| - if (nCurSel >= 0)
|
| - {
|
| - return nCurSel != m_pWidget->GetSelectedIndex(0);
|
| - }
|
| - else
|
| - {
|
| - return pWnd->GetText() != m_pWidget->GetValue();
|
| - }
|
| - }
|
| - else
|
| - {
|
| - return nCurSel != m_pWidget->GetSelectedIndex(0);
|
| - }
|
| - }
|
| + if (nCurSel >= 0)
|
| + return nCurSel != m_pWidget->GetSelectedIndex(0);
|
|
|
| - return FALSE;
|
| + return pWnd->GetText() != m_pWidget->GetValue();
|
| }
|
|
|
| void CFFL_ComboBox::SaveData(CPDFSDK_PageView* pPageView)
|
|
|