Revert "fixed autocompletion error in hasSelection()"

This reverts commit 63e5e8ecf4.
preferencesAboutTextFull
Clément Fauconnier 5 years ago
parent 63e5e8ecf4
commit 80c63726f2
  1. 2
      src/domain/UBGraphicsTextItemDelegate.cpp
  2. 10
      src/domain/UBGraphicsWidgetItem.cpp
  3. 1
      src/domain/UBGraphicsWidgetItem.h
  4. 3
      src/domain/UBGraphicsWidgetItemDelegate.cpp

@ -386,7 +386,7 @@ void UBGraphicsTextItemDelegate::pickColor()
curCursor.mergeCharFormat(format);
delegated()->setTextCursor(curCursor);
if (!curCursor.hasSelection())
if (!curCursor.hasComplexSelection())
UBGraphicsTextItem::lastUsedTextColor = selectedColor;
delegated()->setSelected(true);

@ -556,15 +556,6 @@ void UBGraphicsWidgetItem::sendJSLeaveEvent()
page()->mainFrame()->evaluateJavaScript("if(widget && widget.onleave) { widget.onleave();}");
}
void UBGraphicsWidgetItem::sendJSResizeEvent()
{
if (page() && page()->mainFrame())
{
page()->mainFrame()->evaluateJavaScript("if(widget && widget.onresize) { widget.onresize();}");
page()->mainFrame()->evaluateJavaScript("if(window && window.onresize) { window.onresize();}");
}
}
void UBGraphicsWidgetItem::injectInlineJavaScript()
{
if (!sInlineJavaScriptLoaded) {
@ -663,7 +654,6 @@ void UBGraphicsWidgetItem::resize(qreal w, qreal h)
void UBGraphicsWidgetItem::resize(const QSizeF & pSize)
{
sendJSResizeEvent();
if (pSize != size()) {
QGraphicsWebView::setMaximumSize(pSize.width(), pSize.height());
QGraphicsWebView::resize(pSize.width(), pSize.height());

@ -165,7 +165,6 @@ class UBGraphicsWidgetItem : public QGraphicsWebView, public UBItem, public UBRe
virtual void hoverLeaveEvent(QGraphicsSceneHoverEvent *event);
virtual void sendJSEnterEvent();
virtual void sendJSLeaveEvent();
virtual void sendJSResizeEvent();
virtual void injectInlineJavaScript();
virtual void wheelEvent(QGraphicsSceneWheelEvent *event);
virtual QVariant itemChange(GraphicsItemChange change, const QVariant &value);

@ -44,7 +44,8 @@
#include "core/memcheck.h"
UBGraphicsWidgetItemDelegate::UBGraphicsWidgetItemDelegate(UBGraphicsWidgetItem* pDelegated, int widgetType)
: UBGraphicsItemDelegate(pDelegated, 0, GF_SCALABLE_Y_AXIS)
: UBGraphicsItemDelegate(pDelegated, 0, GF_COMMON
| GF_RESPECT_RATIO)
, freezeAction(0)
, setAsToolAction(0)
{

Loading…
Cancel
Save