From 7b2241085da0e786ce1dff6f736582a5ad379a5c Mon Sep 17 00:00:00 2001 From: Paul Kulchenko Date: Sat, 14 Jul 2012 11:45:57 -0700 Subject: [PATCH] Added refresh of filetree on MacOS to get it displayed correctly when the app is started --- src/main.lua | 10 ++++++---- zbstudio/app.lua | 3 --- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/main.lua b/src/main.lua index 3c83708277..11381420da 100644 --- a/src/main.lua +++ b/src/main.lua @@ -331,10 +331,12 @@ if app.postinit then app.postinit() end -- app-specific menus (Help/About), which are not recognized by MacOS -- as special items unless SetMenuBar is done after menus are populated. ide.frame:SetMenuBar(ide.frame.menuBar) +if ide.osname == 'Macintosh' then -- force refresh to fix the filetree + pcall(function() ide.frame:ShowFullScreen(true) ide.frame:ShowFullScreen(false) end) +end ide.frame:Show(true) --- Call wx.wxGetApp():MainLoop() last to start the wxWidgets event loop, --- otherwise the wxLua program will exit immediately. --- Does nothing if running from wxLua, wxLuaFreeze, or wxLuaEdit since the --- MainLoop is already running or will be started by the C++ program. +-- call wx.wxGetApp():MainLoop() last to start the wxWidgets event loop, +-- otherwise the program will exit immediately. +-- Does nothing if the MainLoop is already running. wx.wxGetApp():MainLoop() diff --git a/zbstudio/app.lua b/zbstudio/app.lua index 0477bdc96a..9978d91203 100644 --- a/zbstudio/app.lua +++ b/zbstudio/app.lua @@ -71,9 +71,6 @@ local app = { if fn:Normalize(wx.wxPATH_NORM_ALL, dir) and fn:FileExists() then LoadFile(fn:GetFullPath(),nil,true) ProjectUpdateProjectDir(fn:GetPath(wx.wxPATH_GET_VOLUME)) - if ide.osname == 'Macintosh' then -- force refresh to fix the filetree - pcall(function() ide.frame:ShowFullScreen(true) ide.frame:ShowFullScreen(false) end) - end break end end