Commit 37e57597 authored by Claudio Valerio's avatar Claudio Valerio

fixed error about wgt that doesn't load when open a document

parent da6a31a3
......@@ -40,7 +40,6 @@ UBW3CWidget::UBW3CWidget(const QUrl& pWidgetUrl, QWidget *parent)
{
QString path = pWidgetUrl.toLocalFile();
QDir potentialDir(path);
if (!path.endsWith(".wgt") && !path.endsWith(".wgt/") && !potentialDir.exists())
......@@ -58,7 +57,7 @@ UBW3CWidget::UBW3CWidget(const QUrl& pWidgetUrl, QWidget *parent)
int width = 300;
int height = 150;
QFile configFile(path + "/config.xml");
QFile configFile(path + "config.xml");
configFile.open(QFile::ReadOnly);
QDomDocument doc;
......@@ -202,6 +201,8 @@ UBW3CWidget::UBW3CWidget(const QUrl& pWidgetUrl, QWidget *parent)
connect(page()->mainFrame(), SIGNAL(javaScriptWindowObjectCleared()), this, SLOT(javaScriptWindowObjectCleared()));
connect(UBApplication::boardController, SIGNAL(activeSceneChanged()), this, SLOT(javaScriptWindowObjectCleared()));
QWebView::load(mMainHtmlUrl);
setFixedSize(QSize(width, height));
mNominalSize = QSize(width, height);
......
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