SANKORE-615

Text object :commands "ctrl+V" aren't work properly, by the both cases, if text was copied from external apps.
preferencesAboutTextFull
Anatoly Mihalchenko 13 years ago
parent d6ca049d9a
commit b529da115c
  1. 10
      src/board/UBBoardController.cpp

@ -1959,8 +1959,12 @@ void UBBoardController::processMimeData(const QMimeData* pMimeData, const QPoint
if("" != url)
{
downloadURL(url, pPos);
return;
}
else
{
mActiveScene->addTextHtml(qsHtml, pPos);
}
return;
}
if (pMimeData->hasUrls())
@ -1996,11 +2000,11 @@ void UBBoardController::processMimeData(const QMimeData* pMimeData, const QPoint
if("" != pMimeData->text()){
// Sometimes, it is possible to have an URL as text. we check here if it is the case
QString qsTmp = pMimeData->text().remove(QRegExp("[\\0]"));
if(qsTmp.startsWith("http")){
if(qsTmp.startsWith("http://") || qsTmp.startsWith("https://")){
downloadURL(QUrl(qsTmp), pPos);
}
else{
mActiveScene->addTextHtml(pMimeData->html(), pPos);
mActiveScene->addTextHtml(pMimeData->text(), pPos);
}
}
else{

Loading…
Cancel
Save