From 63b599908fc2b705775df47d50b38433447aed0d Mon Sep 17 00:00:00 2001 From: Deyan Dobromirov Date: Sun, 26 Jun 2016 11:06:40 +0300 Subject: [PATCH] Arranged: ModelToName() --- lua/autorun/trackassembly_init.lua | 2 +- lua/trackassembly/trackasmlib.lua | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/lua/autorun/trackassembly_init.lua b/lua/autorun/trackassembly_init.lua index 43840dd2..e2f8fbc3 100644 --- a/lua/autorun/trackassembly_init.lua +++ b/lua/autorun/trackassembly_init.lua @@ -30,7 +30,7 @@ local asmlib = trackasmlib ------ CONFIGURE ASMLIB ------ asmlib.InitAssembly("track","assembly") -asmlib.SetOpVar("TOOL_VERSION","5.259") +asmlib.SetOpVar("TOOL_VERSION","5.260") asmlib.SetIndexes("V",1,2,3) asmlib.SetIndexes("A",1,2,3) asmlib.SetIndexes("S",4,5,6,7) diff --git a/lua/trackassembly/trackasmlib.lua b/lua/trackassembly/trackasmlib.lua index 2001a41a..e4a981b6 100644 --- a/lua/trackassembly/trackasmlib.lua +++ b/lua/trackassembly/trackasmlib.lua @@ -1109,11 +1109,10 @@ function ModelToName(sModel,bNoSettings) return StatusLog("","ModelToName: Argument {"..type(sModel).."}<"..tostring(sModel)..">") end if(IsEmptyString(sModel)) then return StatusLog("","ModelToName: Empty string") end local fCh, bCh, Cnt = "", "", 1 - local sSymDiv = GetOpVar("OPSYM_DIVIDER") - local sSymDir = GetOpVar("OPSYM_DIRECTORY") - local sModel = (stringSub(sModel,1,1) ~= sSymDir) and (sSymDir..sModel) - sModel = stringGsub(stringToFileName(sModel),GetOpVar("FILE_MODEL"),"") - local gModel = stringSub(sModel,1,-1) -- Create a copy so we can select cut-off parts later on + local sSymDiv, sSymDir = GetOpVar("OPSYM_DIVIDER"), GetOpVar("OPSYM_DIRECTORY") + local sModel = (stringSub(sModel,1, 1) ~= sSymDir) and (sSymDir..sModel) or sModel + sModel = stringGsub(stringToFileName(sModel),GetOpVar("FILE_MODEL"),"") + local gModel = stringSub(sModel,1,-1) -- Create a copy so we can select cut-off parts later on if(not bNoSettings) then local tCut, tSub, tApp = SettingsModelToName("GET") if(tCut and tCut[1]) then