← Back to team overview

kicad-developers team mailing list archive

Re: macOS & New Zone Filling?

 

On 09/12/17 18:30, Seth Hillbrand wrote:
> Tom-
> 
> I can confirm that this fixes the issue for me on MacOS 10.13
> 

Hi Seth & Bernhard,

Could you try the attached patch?

Tom, in the process of getting a macintosh...
>From aae90576e7b37dfc1d4526951277311ab736255f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Tomasz=20W=C5=82ostowski?= <tomasz.wlostowski@xxxxxxx>
Date: Sat, 9 Dec 2017 20:12:59 +0100
Subject: [PATCH] WX_PROGRESS_REPORTER: possible fix for freeze on OSX

---
 common/widgets/progress_reporter.cpp | 6 ++++++
 include/widgets/progress_reporter.h  | 2 ++
 2 files changed, 8 insertions(+)

diff --git a/common/widgets/progress_reporter.cpp b/common/widgets/progress_reporter.cpp
index 8b8e152..4705488 100644
--- a/common/widgets/progress_reporter.cpp
+++ b/common/widgets/progress_reporter.cpp
@@ -76,6 +76,7 @@ WX_PROGRESS_REPORTER::WX_PROGRESS_REPORTER( wxWindow* aParent,
         const wxString& aTitle,
         int aNumPhases ) :
     PROGRESS_REPORTER( aNumPhases ),
+    m_parent( aParent ),
     wxProgressDialog( aTitle, wxT( "" ), 1, aParent, wxPD_AUTO_HIDE | wxPD_CAN_ABORT |
             wxPD_APP_MODAL | wxPD_ELAPSED_TIME )
 {
@@ -97,6 +98,11 @@ void WX_PROGRESS_REPORTER::updateUI()
 
     SetRange( 1000 );
     wxProgressDialog::Update( cur, m_rptMessage );
+
+    #ifdef __WXMAC__
+            // Work around a dialog z-order issue on OS X
+            m_parent->Raise();
+    #endif
 }
 
 void PROGRESS_REPORTER::KeepRefreshing()
diff --git a/include/widgets/progress_reporter.h b/include/widgets/progress_reporter.h
index 89bee65..457dee8 100644
--- a/include/widgets/progress_reporter.h
+++ b/include/widgets/progress_reporter.h
@@ -67,6 +67,8 @@ public:
 private:
 
     virtual void updateUI() override;
+
+    wxWindow *m_parent;
 };
 
 #endif
-- 
2.7.4


Follow ups

References