Fixed API preferences missing in tool widgets.

preferencesAboutTextFull
Yimgo 12 years ago
parent 338c6390b2
commit 39b023e36f
  1. 7
      src/api/UBW3CWidgetAPI.cpp
  2. 2
      src/gui/UBToolWidget.cpp

@ -147,7 +147,7 @@ QString UBW3CWidgetPreferenceAPI::getItem(const QString& key)
QMap<QString, QString> docPref = mGraphicsW3CWidget->UBGraphicsWidgetItem::preferences();
if (docPref.contains(key))
return docPref.value(key);
}
QMap<QString, UBGraphicsW3CWidgetItem::PreferenceValue> w3cPrefs = mGraphicsW3CWidget->preferences();
@ -155,9 +155,8 @@ QString UBW3CWidgetPreferenceAPI::getItem(const QString& key)
UBGraphicsW3CWidgetItem::PreferenceValue pref = w3cPrefs.value(key);
return pref.value;
}
else
return "";
}
return QString();
}
int UBW3CWidgetPreferenceAPI::length()

@ -111,7 +111,7 @@ void UBToolWidget::initialize()
void UBToolWidget::javaScriptWindowObjectCleared()
{
UBWidgetUniboardAPI *uniboardAPI = new UBWidgetUniboardAPI(UBApplication::boardController->activeScene());
UBWidgetUniboardAPI *uniboardAPI = new UBWidgetUniboardAPI(UBApplication::boardController->activeScene(), mGraphicsWidgetItem);
mGraphicsWebView->page()->mainFrame()->addToJavaScriptWindowObject("sankore", uniboardAPI);

Loading…
Cancel
Save