Your ROOT_URL in app.ini is http://git.osmesh.ru/ but you are visiting http://91.221.70.94:3000/MOS/OpenBoard/commit/5cec06a62a934a5108152b2140f69c467ab929bf?style=unified&whitespace=show-all
You should set ROOT_URL correctly, otherwise the web may not work correctly.
3 changed files with
20 additions and
23 deletions
src/board/UBBoardController.cpp
src/domain/UBGraphicsPolygonItem.cpp
src/domain/UBGraphicsStrokesGroup.cpp
@ -557,11 +557,10 @@ void UBBoardController::duplicateItem(UBItem *item)
UBMimeType : : Enum itemMimeType ;
QString contentTypeHeader = UBFileSystemUtils : : mimeTypeFromFileName ( item - > sourceUrl ( ) . toLocalFile ( ) ) ;
if ( NULL ! = qgraphicsitem_cast < UBGraphicsGroupContainerItem * > ( commonItem ) ) {
itemMimeType = UBMimeType : : Group ;
} else {
itemMimeType = UBFileSystemUtils : : mimeTypeFromString ( contentTypeHeader ) ;
}
if ( NULL ! = qgraphicsitem_cast < UBGraphicsGroupContainerItem * > ( commonItem ) )
itemMimeType = UBMimeType : : Group ;
else
itemMimeType = UBFileSystemUtils : : mimeTypeFromString ( contentTypeHeader ) ;
switch ( static_cast < int > ( itemMimeType ) )
{
@ -633,7 +632,6 @@ void UBBoardController::duplicateItem(UBItem *item)
QGraphicsItem * gitem = dynamic_cast < QGraphicsItem * > ( item - > deepCopy ( ) ) ;
if ( gitem )
{
qDebug ( ) < < " Adding a stroke: " < < gitem ;
mActiveScene - > addItem ( gitem ) ;
gitem - > setPos ( itemPos ) ;
mLastCreatedItem = gitem ;
@ -142,14 +142,14 @@ QColor UBGraphicsPolygonItem::color() const
UBItem * UBGraphicsPolygonItem : : deepCopy ( ) const
{
UBGraphicsPolygonItem * copy = new UBGraphicsPolygonItem ( polygon ( ) , parentItem ( ) ) ;
{
UBGraphicsPolygonItem * copy = new UBGraphicsPolygonItem ( polygon ( ) , 0 ) ;
UBGraphicsStroke * stroke = new UBGraphicsStroke ( ) ;
copyItemParameters ( copy ) ;
copy - > mOriginalLine = this - > mOriginalLine ;
copy - > mOriginalWidth = this - > mOriginalWidth ;
copy - > mIsNominalLine = this - > mIsNominalLine ;
copy - > setStroke ( stroke ) ;
return copy ;
}
@ -160,17 +160,15 @@ void UBGraphicsPolygonItem::copyItemParameters(UBItem *copy) const
UBGraphicsPolygonItem * cp = dynamic_cast < UBGraphicsPolygonItem * > ( copy ) ;
if ( cp )
{
cp - > mOriginalLine = QLineF ( ) ;
cp - > mOriginalWidth = - 1 ;
cp - > mIsNominalLine = fals e;
cp - > mOriginalLine = this - > mOriginalLine ;
cp - > mOriginalWidth = this - > mOriginalWidth ;
cp - > mIsNominalLine = this - > mIsNominalLin e;
cp - > setStroke ( this - > stroke ( ) ) ;
cp - > setStrokesGroup ( this - > strokesGroup ( ) ) ;
cp - > setTransform ( transform ( ) ) ;
cp - > setBrush ( this - > brush ( ) ) ;
cp - > setPen ( this - > pen ( ) ) ;
cp - > mHasAlpha = this - > mHasAlpha ;
cp - > setColorOnDarkBackground ( this - > colorOnDarkBackground ( ) ) ;
cp - > setColorOnLightBackground ( this - > colorOnLightBackground ( ) ) ;
@ -65,29 +65,30 @@ void UBGraphicsStrokesGroup::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
UBItem * UBGraphicsStrokesGroup : : deepCopy ( ) const
{
UBGraphicsStrokesGroup * copy = new UBGraphicsStrokesGroup ( ) ;
UBGraphicsStrokesGroup * copy = new UBGraphicsStrokesGroup ( ) ;
QList < QGraphicsItem * > chl = childItems ( ) ;
QList < QGraphicsItem * > chl = childItems ( ) ;
foreach ( QGraphicsItem * child , chl )
{
UBGraphicsPolygonItem * polygon = dynamic_cast < UBGraphicsPolygonItem * > ( child ) ;
if ( polygon )
{
copy - > addToGroup ( dynamic_cast < QGraphicsItem * > ( polygon - > deepCopy ( ) ) ) ;
polygon - > setStrokesGroup ( copy ) ;
}
}
copyItemParameters ( copy ) ;
return copy ;
return copy ;
}
void UBGraphicsStrokesGroup : : copyItemParameters ( UBItem * copy ) const
{
UBGraphicsStrokesGroup * cp = dynamic_cast < UBGraphicsStrokesGroup * > ( copy ) ;
{
cp - > setPos ( this - > pos ( ) ) ;
cp - > setTransform ( transform ( ) ) ;
cp - > setTransform ( this - > transform ( ) ) ;
cp - > setFlag ( QGraphicsItem : : ItemIsMovable , true ) ;
cp - > setFlag ( QGraphicsItem : : ItemIsSelectable , true ) ;
cp - > setData ( UBGraphicsItemData : : ItemLayerType , this - > data ( UBGraphicsItemData : : ItemLayerType ) ) ;