Commit dc272ce3 authored by Claudio Valerio's avatar Claudio Valerio

fixed issue 1131 and 1161

parent 3607318f
......@@ -781,7 +781,6 @@ void UBBoardView::handleItemMouseMove(QMouseEvent *event)
// at simple - in google map widget - mouse move events doesn't comes to web page from rectangle of wearch bar on bottom right corner of widget.
if (mWidgetMoved && UBGraphicsW3CWidgetItem::Type == movingItem->type())
movingItem->setPos(posBeforeMove);
}
}
......
......@@ -303,9 +303,7 @@ UBGraphicsScene::UBGraphicsScene(UBDocumentProxy* parent, bool enableUndoRedoSta
UBGraphicsScene::~UBGraphicsScene()
{
if (mCurrentStroke)
if (mCurrentStroke->polygons().empty())
{
if (mCurrentStroke && mCurrentStroke->polygons().empty()){
delete mCurrentStroke;
mCurrentStroke = NULL;
}
......
......@@ -119,7 +119,8 @@ void UBGraphicsWidgetItem::initialize()
void UBGraphicsWidgetItem::onLinkClicked(const QUrl& url)
{
UBApplication::webController->loadUrl(url);
//UBApplication::webController->loadUrl(url);
load(url);
}
void UBGraphicsWidgetItem::initialLayoutCompleted()
......@@ -147,24 +148,6 @@ QString UBGraphicsWidgetItem::mainHtmlFileName()
return mMainHtmlFileName;
}
bool UBGraphicsWidgetItem::hasEmbededObjects()
{
if (page()->mainFrame()) {
QList<UBWebKitUtils::HtmlObject> htmlObjects = UBWebKitUtils::objectsInFrame(page()->mainFrame());
return htmlObjects.length() > 0;
}
return false;
}
bool UBGraphicsWidgetItem::hasEmbededFlash()
{
if (hasEmbededObjects())
return page()->mainFrame()->toHtml().contains("application/x-shockwave-flash");
else
return false;
}
bool UBGraphicsWidgetItem::canBeContent()
{
// if we under MAC OS
......@@ -886,9 +869,6 @@ UBGraphicsW3CWidgetItem::UBGraphicsW3CWidgetItem(const QUrl& pWidgetUrl, QGraphi
/* is it a valid local file ? */
QFile f(mMainHtmlUrl.toLocalFile());
qDebug() << mMainHtmlFileName;
qDebug() << mMainHtmlUrl.toLocalFile();
if(!f.exists())
mMainHtmlUrl = QUrl(mMainHtmlFileName);
......
......@@ -62,9 +62,6 @@ class UBGraphicsWidgetItem : public QGraphicsWebView, public UBItem, public UBRe
QUrl widgetUrl();
QString mainHtmlFileName();
bool hasEmbededObjects();
bool hasEmbededFlash();
bool canBeContent();
bool canBeTool();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment