Added refresh of filetree on MacOS to get it displayed correctly when the app is started
This commit is contained in:
10
src/main.lua
10
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()
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user