Ticket #31028: patch-ipe-lua-main.lua.diff

File patch-ipe-lua-main.lua.diff, 855 bytes (added by m.thon@…, 13 years ago)

updated version (patch another minor bug while we're at it)

  • ipe/lua/main.lua

    old new  
    147147-- This function is called to launch a file
    148148
    149149function file_open_event(fname)
    150   if first_model and first_model.pristine then
    151     first_model.loadDocument(fname)
     150  if first_model and not first_model.file_name and not first_model:isModified() then
     151    first_model:loadDocument(fname)
    152152  else
    153153    MODEL:new(fname)
    154154  end
     
    249249end
    250250
    251251config.ipeletDirs = {}
    252 for w in string.gmatch(config.ipelets, "[^;]+") do
     252for w in string.gmatch(config.ipelets, "[^;:]+") do
    253253  config.ipeletDirs[#config.ipeletDirs + 1] = w
    254254end
    255255
    256 if config.platform == "unix" then
     256if config.platform == "unix" or config.platform == "apple" then
    257257  table.insert(config.ipeletDirs, 1, config.home .. "/.ipe/ipelets")
    258258end
    259259