summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorYong Lin Ma <mayongl@apache.org>2012-07-10 02:29:03 +0000
committerCaolán McNamara <caolanm@redhat.com>2013-07-01 12:34:38 +0100
commitba8bcc2681d8e9788ae2d6fef11308d5f0fcae05 (patch)
tree1a1471629c952ec519edf64060e2d98e3597fa3e /vcl
parent99a4baf89c470d1e73b4e87fe9adf37a09230a2c (diff)
Resolves: #i119994# Range picker dialog is changed to modal mode wrongly
Patch by: Peng YunQuan Review by: mayongl Reported by: Yan Ji (cherry picked from commit 94c8978a16536738bbad7a52cdfb9f37a4d19ed0) Change-Id: I66bb91bf07a5c52b2a5e2b2a91187ac9580fbb0a
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/window/dialog.cxx17
1 files changed, 15 insertions, 2 deletions
diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx
index aca80f1b3f50..0a63d2514b2f 100644
--- a/vcl/source/window/dialog.cxx
+++ b/vcl/source/window/dialog.cxx
@@ -1083,8 +1083,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 );
+ }
}
}
}