Merge "Add index to label when the item has no label" into tizen
authorSuyeon Hwang <stom.hwang@samsung.com>
Thu, 22 Sep 2022 00:45:16 +0000 (00:45 +0000)
committerGerrit Code Review <gerrit@review>
Thu, 22 Sep 2022 00:45:16 +0000 (00:45 +0000)
1  2 
src/mmimgr/iu/VoiceTouchEngine.cpp

index 4a1dab27dcc0c03fc06498e8010473e753e0987e,f8cd787fb37559b10995fbf4163ed1a275ea04cc..5461ffbff8f5ad8b967ef7626542d9109ef2b4cb
@@@ -352,10 -352,10 +352,11 @@@ void VoiceTouchEngine::makeClickableIte
  
        provider.setOutputEvent(MMI_KEY_UI_CLICKABLE_OBJECT);
        provider.setUiClickableObject(resultType, __appId.c_str(), tooltipType, __itemList.size(), timestamp);
 +      provider.setGridDepth(__currentGridInfo.currentStep + 1);
  
        for (auto &item : *itemList) {
-               provider.addInfoClickableObject(item.index, item.coordX, item.coordY, item.width, item.height, item.label.c_str());
+               auto label = (item.label.empty() ? to_string(item.index) : item.label);
+               provider.addInfoClickableObject(item.index, item.coordX, item.coordY, item.width, item.height, label.c_str());
        }
  }