incubator-ooo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mayo...@apache.org
Subject svn commit: r1359466 - /incubator/ooo/trunk/main/vcl/source/window/dialog.cxx
Date Tue, 10 Jul 2012 03:29:03 GMT
Author: mayongl
Date: Tue Jul 10 03:29:03 2012
New Revision: 1359466

URL: http://svn.apache.org/viewvc?rev=1359466&view=rev
Log:
119994: Range picker dialog is changed to modal mode wrongly

Patch by: Peng YunQuan
Review by: mayongl
Reported by: Yan Ji

Modified:
    incubator/ooo/trunk/main/vcl/source/window/dialog.cxx

Modified: incubator/ooo/trunk/main/vcl/source/window/dialog.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/vcl/source/window/dialog.cxx?rev=1359466&r1=1359465&r2=1359466&view=diff
==============================================================================
--- incubator/ooo/trunk/main/vcl/source/window/dialog.cxx (original)
+++ incubator/ooo/trunk/main/vcl/source/window/dialog.cxx Tue Jul 10 03:29:03 2012
@@ -877,8 +877,21 @@ void Dialog::SetModalInputMode( sal_Bool
             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 );
+            }			
         }
     }
 }



Mime
View raw message