diff --git a/src/domain/UBGraphicsWidgetItem.cpp b/src/domain/UBGraphicsWidgetItem.cpp index 0bed044b..b1b9ed03 100644 --- a/src/domain/UBGraphicsWidgetItem.cpp +++ b/src/domain/UBGraphicsWidgetItem.cpp @@ -84,6 +84,9 @@ UBGraphicsWidgetItem::UBGraphicsWidgetItem(const QUrl &pWidgetUrl, QGraphicsItem QGraphicsWebView::settings()->setAttribute(QWebSettings::JavascriptCanAccessClipboard, true); QGraphicsWebView::settings()->setAttribute(QWebSettings::DnsPrefetchEnabled, true); QGraphicsWebView::settings()->setAttribute(QWebSettings::LocalContentCanAccessRemoteUrls, true); +#ifdef QT_DEBUG + QGraphicsWebView::settings()->setAttribute(QWebSettings::DeveloperExtrasEnabled, true); +#endif page()->setNetworkAccessManager(UBNetworkAccessManager::defaultAccessManager()); diff --git a/src/domain/UBGraphicsWidgetItemDelegate.cpp b/src/domain/UBGraphicsWidgetItemDelegate.cpp index c6b03628..107e9174 100644 --- a/src/domain/UBGraphicsWidgetItemDelegate.cpp +++ b/src/domain/UBGraphicsWidgetItemDelegate.cpp @@ -64,6 +64,13 @@ void UBGraphicsWidgetItemDelegate::pin() UBApplication::boardController->moveGraphicsWidgetToControlView(delegated()); } +void UBGraphicsWidgetItemDelegate::createControls() +{ + UBGraphicsItemDelegate::createControls(); + + if (delegated() && delegated()->resizable()) + frame()->setOperationMode(UBGraphicsDelegateFrame::Resizing); +} void UBGraphicsWidgetItemDelegate::updateMenuActionState() { diff --git a/src/domain/UBGraphicsWidgetItemDelegate.h b/src/domain/UBGraphicsWidgetItemDelegate.h index 4492e2fd..d4b36b4c 100644 --- a/src/domain/UBGraphicsWidgetItemDelegate.h +++ b/src/domain/UBGraphicsWidgetItemDelegate.h @@ -44,11 +44,12 @@ class UBGraphicsWidgetItemDelegate : public UBGraphicsItemDelegate UBGraphicsWidgetItemDelegate(UBGraphicsWidgetItem* pDelegated, int widgetType = 0); virtual ~UBGraphicsWidgetItemDelegate(); + virtual void createControls() override; protected: - virtual void decorateMenu(QMenu* menu); - virtual void updateMenuActionState(); - virtual void remove(bool canundo); + virtual void decorateMenu(QMenu* menu) override; + virtual void updateMenuActionState() override; + virtual void remove(bool canundo) override; private slots: