Your ROOT_URL in app.ini is http://git.osmesh.ru/ but you are visiting http://91.221.70.94:3000/MOS/OpenBoard/commit/63e5e8ecf4ddcc67b0818091b62d4f7230d5799e
You should set ROOT_URL correctly, otherwise the web may not work correctly.
4 changed files with
13 additions and
3 deletions
src/domain/UBGraphicsTextItemDelegate.cpp
src/domain/UBGraphicsWidgetItem.cpp
src/domain/UBGraphicsWidgetItem.h
src/domain/UBGraphicsWidgetItemDelegate.cpp
@ -386,7 +386,7 @@ void UBGraphicsTextItemDelegate::pickColor()
curCursor . mergeCharFormat ( format ) ;
delegated ( ) - > setTextCursor ( curCursor ) ;
if ( ! curCursor . hasComplex Selection ( ) )
if ( ! curCursor . hasSelection ( ) )
UBGraphicsTextItem : : lastUsedTextColor = selectedColor ;
delegated ( ) - > setSelected ( true ) ;
@ -556,6 +556,15 @@ 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 ) {
@ -654,6 +663,7 @@ 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,6 +165,7 @@ 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,8 +44,7 @@
# include "core/memcheck.h"
UBGraphicsWidgetItemDelegate : : UBGraphicsWidgetItemDelegate ( UBGraphicsWidgetItem * pDelegated , int widgetType )
: UBGraphicsItemDelegate ( pDelegated , 0 , GF_COMMON
| GF_RESPECT_RATIO )
: UBGraphicsItemDelegate ( pDelegated , 0 , GF_SCALABLE_Y_AXIS )
, freezeAction ( 0 )
, setAsToolAction ( 0 )
{