diff options
author | Janne Kangas <janne.kangas@qt.io> | 2018-05-15 11:49:01 +0300 |
---|---|---|
committer | Janne Kangas <janne.kangas@qt.io> | 2018-05-23 11:37:31 +0000 |
commit | cf2bee25fe8a48dfeb2cb89959af677b7847640b (patch) | |
tree | a8aeaf4d342b75a079a6f96bf98111872fe175b2 | |
parent | 8ad8cd44fe9ed07523c7993d8a7b5368f40c7aa5 (diff) |
Fix index calculation typo
Change-Id: I8532cf09df3cfabf933f7dd9b04cb988e3e6a700
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
-rw-r--r-- | src/Authoring/Client/Code/Core/Doc/Doc.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Authoring/Client/Code/Core/Doc/Doc.cpp b/src/Authoring/Client/Code/Core/Doc/Doc.cpp index ef117753..bf9b3f27 100644 --- a/src/Authoring/Client/Code/Core/Doc/Doc.cpp +++ b/src/Authoring/Client/Code/Core/Doc/Doc.cpp @@ -253,7 +253,7 @@ bool ModifyControlStrForProperty(Q3DStudio::CString &controlledPropStr, if (!controlled) { // get the length of to-be-deleted controller - property string and // delete it from the overall controlledproperty - long posProp = cpStr.find(propName); + long posProp = cpStr.find(" " + propName); if (posProp == Q3DStudio::CString::ENDOFSTRING) return false; @@ -264,7 +264,7 @@ bool ModifyControlStrForProperty(Q3DStudio::CString &controlledPropStr, if (posCtrlr < 0) posCtrlr = 0; - long deletableStrLen = (posProp + propName.Length()) - posCtrlr; + long deletableStrLen = (posProp + propName.Length()) - posCtrlr + 1; cpStr.Delete(posCtrlr, deletableStrLen); |