Fix underline issue when PreeditStyle is REVERSE, HIGHLIGHT 16/260416/1
authorBowon Ryu <bowon.ryu@samsung.com>
Thu, 24 Jun 2021 08:20:09 +0000 (17:20 +0900)
committerBowon Ryu <bowon.ryu@samsung.com>
Thu, 24 Jun 2021 08:21:01 +0000 (17:21 +0900)
Even if it is PreeditStyle without underline,
need to do UnderlineRuns for any markup underlines that may exist in text.

Change-Id: I6920dde2c7be93583eef4adfa5c026a671fcbbf6
Signed-off-by: Bowon Ryu <bowon.ryu@samsung.com>
dali-toolkit/internal/text/text-controller-impl.cpp

index a513d70..b8b6f31 100644 (file)
@@ -922,8 +922,13 @@ bool Controller::Impl::UpdateModel(OperationsMask operationsRequired)
           colorRun.color                           = backgroundColor;
           colorRun.characterRun.characterIndex     = attrData.startIndex + numberOfCommit;
           colorRun.characterRun.numberOfCharacters = numberOfIndices;
-
           mModel->mLogicalModel->mColorRuns.PushBack(colorRun);
+
+          //Mark-up processor case
+          if(mModel->mVisualModel->IsMarkupProcessorEnabled())
+          {
+            CopyUnderlinedFromLogicalToVisualModels(false);
+          }
           break;
         }
         case Dali::InputMethodContext::PreeditStyle::HIGHLIGHT:
@@ -933,6 +938,12 @@ bool Controller::Impl::UpdateModel(OperationsMask operationsRequired)
           backgroundColorRun.characterRun.numberOfCharacters = numberOfIndices;
           backgroundColorRun.color                           = LIGHT_BLUE;
           mModel->mLogicalModel->mBackgroundColorRuns.PushBack(backgroundColorRun);
+
+          //Mark-up processor case
+          if(mModel->mVisualModel->IsMarkupProcessorEnabled())
+          {
+            CopyUnderlinedFromLogicalToVisualModels(false);
+          }
           break;
         }
         case Dali::InputMethodContext::PreeditStyle::CUSTOM_PLATFORM_STYLE_1: