Your ROOT_URL in app.ini is http://git.osmesh.ru/ but you are visiting https://git.osmesh.ru/MOS/OpenBoard/commit/87ad5885ec1c20b7ddd6a9f4ba013742ae772c32
You should set ROOT_URL correctly, otherwise the web may not work correctly.
4 changed files with
30 additions and
3 deletions
src/domain/UBGraphicsScene.cpp
src/domain/UBGraphicsScene.h
src/domain/UBItem.cpp
src/domain/UBSelectionFrame.cpp
@ -276,6 +276,18 @@ void UBZLayerController::setLayerType(QGraphicsItem *pItem, itemLayerType::Enum
pItem - > setData ( UBGraphicsItemData : : itemLayerType , QVariant ( pNewType ) ) ;
}
void UBZLayerController : : shiftStoredZValue ( QGraphicsItem * item , qreal zValue )
{
itemLayerType : : Enum type = typeForData ( item ) ;
if ( validLayerType ( type ) ) {
ItemLayerTypeData typeData = scopeMap . value ( type ) ;
if ( typeData . curValue < zValue ) {
scopeMap [ type ] . curValue = zValue ;
}
}
}
UBGraphicsScene : : UBGraphicsScene ( UBDocumentProxy * parent , bool enableUndoRedoStack )
: UBCoreGraphicsScene ( parent )
, mEraser ( 0 )
@ -1051,6 +1063,11 @@ UBBoardView *UBGraphicsScene::controlView()
return result ;
}
void UBGraphicsScene : : notifyZChanged ( QGraphicsItem * item , qreal zValue )
{
mZLayerController - > shiftStoredZValue ( item , zValue ) ;
}
void UBGraphicsScene : : updateSelectionFrame ( )
{
qDebug ( ) < < " selected item count " < < selectedItems ( ) . count ( ) ;
@ -1647,6 +1664,8 @@ void UBGraphicsScene::addItem(QGraphicsItem* item)
if ( item - > zValue ( ) = = DEFAULT_Z_VALUE | | item - > zValue ( ) = = UBZLayerController : : errorNum ( ) ) {
qreal zvalue = mZLayerController - > generateZLevel ( item ) ;
UBGraphicsItem : : assignZValue ( item , zvalue ) ;
} else {
notifyZChanged ( item , item - > zValue ( ) ) ;
}
if ( ! mTools . contains ( item ) )
@ -96,6 +96,7 @@ public:
qreal changeZLevelTo ( QGraphicsItem * item , moveDestination dest ) ;
itemLayerType : : Enum typeForData ( QGraphicsItem * item ) const ;
void setLayerType ( QGraphicsItem * pItem , itemLayerType : : Enum pNewType ) ;
void shiftStoredZValue ( QGraphicsItem * item , qreal zValue ) ;
private :
ScopeMap scopeMap ;
@ -311,6 +312,7 @@ class UBGraphicsScene: public UBCoreGraphicsScene, public UBItem
UBGraphicsPolygonItem * polygonToPolygonItem ( const QPolygonF pPolygon ) ;
void clearSelectionFrame ( ) ;
UBBoardView * controlView ( ) ;
void notifyZChanged ( QGraphicsItem * item , qreal zValue ) ;
public slots :
@ -32,6 +32,7 @@
# include "domain/UBGraphicsStrokesGroup.h"
# include "domain/UBGraphicsGroupContainerItem.h"
# include "domain/UBGraphicsWidgetItem.h"
# include "domain/UBGraphicsScene.h"
# include "tools/UBGraphicsCurtainItem.h"
# include "domain/UBGraphicsItemDelegate.h"
@ -191,7 +191,7 @@ void UBSelectionFrame::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
item - > update ( ) ;
item - > setTransform ( ownTransform , false ) ;
int resultAngle = ( int ) mRotationAngle % 360 ;
// int resultAngle = (int)mRotationAngle % 360;
// setCursorFromAngle(QString::number(resultAngle));
qDebug ( ) < < " curAngle " < < mRotationAngle ;
@ -284,9 +284,14 @@ void UBSelectionFrame::increaseZlevelDown()
void UBSelectionFrame : : increaseZlevelBottom ( )
{
foreach ( QGraphicsItem * item , sortedByZ ( scene ( ) - > selectedItems ( ) ) ) {
ubscene ( ) - > changeZLevelTo ( item , UBZLayerController : : bottom ) ;
QListIterator < QGraphicsItem * > iter ( sortedByZ ( scene ( ) - > selectedItems ( ) ) ) ;
iter . toBack ( ) ;
while ( iter . hasPrevious ( ) ) {
ubscene ( ) - > changeZLevelTo ( iter . previous ( ) , UBZLayerController : : bottom ) ;
}
// foreach (QGraphicsItem *item, sortedByZ(scene()->selectedItems())) {
// ubscene()->changeZLevelTo(item, UBZLayerController::bottom);
// }
}
void UBSelectionFrame : : translateItem ( QGraphicsItem */ * item */ , const QPointF & /*translatePoint*/ )