Merge branch 'Sankore-1.40' of github.com:Sankore/Sankore-3.1 into Sankore-1.40

preferencesAboutTextFull
Claudio Valerio 13 years ago
commit 1fd290d617
  1. 3
      src/api/UBWidgetUniboardAPI.cpp
  2. 10
      src/board/UBBoardController.cpp

@ -467,7 +467,10 @@ void UBWidgetUniboardAPI::sendFileMetadata(QString metaData)
void UBWidgetUniboardAPI::enableDropOnWidget(bool enable) void UBWidgetUniboardAPI::enableDropOnWidget(bool enable)
{ {
if (mGraphicsWidget)
{
mGraphicsWidget->setAcceptDrops(enable); mGraphicsWidget->setAcceptDrops(enable);
}
} }
void UBWidgetUniboardAPI::ProcessDropEvent(QDropEvent *event) void UBWidgetUniboardAPI::ProcessDropEvent(QDropEvent *event)

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

Loading…
Cancel
Save