Your ROOT_URL in app.ini is http://git.osmesh.ru/ but you are visiting http://91.221.70.94:3000/MOS/OpenBoard/commit/f85bb2d5fa767c7bb63c739f45d7a20e86f3aaaf?style=unified&whitespace=ignore-all
You should set ROOT_URL correctly, otherwise the web may not work correctly.
3 changed files with
16 additions and
5 deletions
src/domain/UBGraphicsScene.cpp
src/gui/UBTeacherGuideWidget.cpp
src/gui/UBTeacherGuideWidget.h
@ -1480,15 +1480,18 @@ UBGraphicsTextItem* UBGraphicsScene::textForObjectName(const QString& pString, c
//looking for a previous such item text
for ( int i = 0 ; i < mFastAccessItems . count ( ) & & ! found ; i + = 1 ) {
UBGraphicsTextItem * currentItem = dynamic_cast < UBGraphicsTextItem * > ( mFastAccessItems . at ( i ) ) ;
if ( currentItem & & currentItem - > objectName ( ) = = objectName ) {
if ( currentItem & & ( currentItem - > objectName ( ) = = objectName | | currentItem - > toPlainText ( ) = = pString ) ) {
// The second condition is necessary because the object name isn't stored. On reopeining the file we
// need another rule than the objectName
textItem = currentItem ;
found = true ;
if ( currentItem - > objectName ( ) ! = objectName )
textItem - > setObjectName ( objectName ) ;
}
}
if ( ! textItem ) {
textItem = addTextWithFont ( pString , QPointF ( 0 , 0 ) , 6 4, " " , true , false ) ;
textItem = addTextWithFont ( pString , QPointF ( 0 , 0 ) , 48 , " " , true , false ) ;
textItem - > setObjectName ( objectName ) ;
textItem - > Delegate ( ) - > setCanDuplicate ( false ) ;
}
textItem - > setPlainText ( pString ) ;
@ -829,7 +829,7 @@ void UBTeacherGuidePageZeroWidget::onActiveSceneChanged()
QDateTime updatedDate = documentProxy - > lastUpdate ( ) ;
mpLastModifiedLabel - > setText ( tr ( " Updated the: \n " ) + updatedDate . toString ( Qt : : SystemLocaleShortDate ) ) ;
loadData ( ) ;
UBApplication : : boardController - > activeScene ( ) - > textForObjectName ( mpSessionTitle - > text ( ) ) ;
updateSceneTitle ( ) ;
}
}
@ -873,6 +873,13 @@ void UBTeacherGuidePageZeroWidget::persistData()
documentProxy - > setMetaData ( UBSettings : : sessionLicence , mpLicenceBox - > currentText ( ) ) ;
}
void UBTeacherGuidePageZeroWidget : : updateSceneTitle ( )
{
QString sessionTitle = mpSessionTitle - > text ( ) ;
if ( ! sessionTitle . isEmpty ( ) )
UBApplication : : boardController - > activeScene ( ) - > textForObjectName ( mpSessionTitle - > text ( ) ) ;
}
void UBTeacherGuidePageZeroWidget : : switchToMode ( tUBTGZeroPageMode mode )
{
if ( mode = = tUBTGZeroPageMode_EDITION ) {
@ -902,7 +909,7 @@ void UBTeacherGuidePageZeroWidget::switchToMode(tUBTGZeroPageMode mode)
QString inputStyleSheet ( " QTextEdit { background: transparent; border: none;} " ) ;
mpModePushButton - > show ( ) ;
mpSessionTitle - > setReadOnly ( true ) ;
UBApplication : : boardController - > activeScene ( ) - > textForObjectName ( mpSessionTitle - > text ( ) ) ;
updateSceneTitle ( ) ;
mpSessionTitle - > setStyleSheet ( inputStyleSheet ) ;
mpSessionTitle - > setTextColor ( QColor ( Qt : : black ) ) ;
QFont titleFont ( QApplication : : font ( ) . family ( ) , 14 , 1 ) ;
@ -135,6 +135,7 @@ private:
void loadData ( ) ;
void hideEvent ( QHideEvent * event ) ;
bool eventFilter ( QObject * object , QEvent * event ) ;
void updateSceneTitle ( ) ;
QVBoxLayout * mpLayout ;
QHBoxLayout * mpButtonTitleLayout ;