diff options
author | Yong Lin Ma <mayongl@apache.org> | 2012-07-10 02:29:03 +0000 |
---|---|---|
committer | Yong Lin Ma <mayongl@apache.org> | 2012-07-10 02:29:03 +0000 |
commit | 94c8978a16536738bbad7a52cdfb9f37a4d19ed0 (patch) | |
tree | cc1ee0da39bbfa7d4eac7d476d30a791333fdb4c /vcl/source | |
parent | 4034798d137593863fdc9041ec9cd55ad88fbf84 (diff) |
119994: Range picker dialog is changed to modal mode wrongly
Patch by: Peng YunQuan
Review by: mayongl
Reported by: Yan Ji
Notes
Notes:
merged as: ba8bcc2681d8e9788ae2d6fef11308d5f0fcae05
Diffstat (limited to 'vcl/source')
-rw-r--r-- | vcl/source/window/dialog.cxx | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx index 6192a4019bbc..4fe4fac16a51 100644 --- a/vcl/source/window/dialog.cxx +++ b/vcl/source/window/dialog.cxx @@ -877,8 +877,21 @@ void Dialog::SetModalInputMode( sal_Bool bModal ) mpPrevExecuteDlg->EnableInput( sal_True, sal_True, sal_True, this ); // ensure continued modality of prev dialog // do not change modality counter - mpPrevExecuteDlg->SetModalInputMode( sal_False ); - mpPrevExecuteDlg->SetModalInputMode( sal_True ); + + + // #i119994# need find the last modal dialog before reactive it + Dialog * pPrevModalDlg = mpPrevExecuteDlg; + + while( pPrevModalDlg && !pPrevModalDlg->IsModalInputMode() ) + pPrevModalDlg = pPrevModalDlg->mpPrevExecuteDlg; + + if( pPrevModalDlg && + ( pPrevModalDlg == mpPrevExecuteDlg + || !pPrevModalDlg->IsWindowOrChild( this, sal_True ) ) ) + { + mpPrevExecuteDlg->SetModalInputMode( sal_False ); + mpPrevExecuteDlg->SetModalInputMode( sal_True ); + } } } } |