src/gui/dialogs/qfontdialog_mac.mm
changeset 37 758a864f9613
parent 30 5dc02b23752f
--- a/src/gui/dialogs/qfontdialog_mac.mm	Fri Sep 17 08:34:18 2010 +0300
+++ b/src/gui/dialogs/qfontdialog_mac.mm	Mon Oct 04 01:19:32 2010 +0300
@@ -131,6 +131,7 @@
 - (QFont)qtFont;
 - (void)finishOffWithCode:(NSInteger)result;
 - (void)cleanUpAfterMyself;
+- (void)setSubwindowStacking;
 @end
 
 static QFont qfontForCocoaFont(NSFont *cocoaFont, const QFont &resolveFont)
@@ -187,6 +188,12 @@
         [cancelButton setTarget:self];
     }
 
+    mQtFont = new QFont();
+    return self;
+}
+
+- (void)setSubwindowStacking
+{
 #ifdef QT_MAC_USE_COCOA
     // Stack the native dialog in front of its parent, if any:
     QFontDialog *q = mPriv->fontDialog();
@@ -199,9 +206,6 @@
         }
     }
 #endif
-
-    mQtFont = new QFont();
-    return self;
 }
 
 - (void)dealloc
@@ -610,6 +614,7 @@
         [ourPanel setFrame:frameRect display:NO];
         [ourPanel center];
     }
+    [del setSubwindowStacking];
     NSString *title = @"Select font";
     [ourPanel setTitle:title];
 }