Your ROOT_URL in app.ini is http://git.osmesh.ru/ but you are visiting http://91.221.70.94:3000/MOS/OpenBoard/commit/77aa2783a23e0db96d997db7b239616177be3e37
You should set ROOT_URL correctly, otherwise the web may not work correctly.
3 changed files with
21 additions and
5 deletions
src/gui/UBTeacherGuideWidget.cpp
src/gui/UBTeacherGuideWidgetsTools.cpp
src/gui/UBTeacherGuideWidgetsTools.h
@ -1023,7 +1023,7 @@ void UBTeacherGuidePageZeroWidget::switchToMode(tUBTGZeroPageMode mode)
QString inputStyleSheet ( " QTextEdit { background: white; border-radius: 10px; border: 2px;} " ) ;
mpModePushButton - > hide ( ) ;
mpSessionTitle - > setReadOnly ( false ) ;
mpSessionTitle - > managePlaceholder ( fals e) ;
mpSessionTitle - > managePlaceholder ( tru e) ;
mpSessionTitle - > setStyleSheet ( inputStyleSheet ) ;
QFont titleFont ( QApplication : : font ( ) . family ( ) , 11 , - 1 ) ;
mpSessionTitle - > document ( ) - > setDefaultFont ( titleFont ) ;
@ -24,6 +24,9 @@
# include <QApplication>
# include <QDomElement>
# include <QWebFrame>
# include <QTextDocument>
# include <QTextBlock>
# include <QTextCursor>
# include "UBTeacherGuideWidgetsTools.h"
@ -190,10 +193,11 @@ void UBTGAdaptableText::onTextChanged()
mIsUpdatingSize = true ;
if ( documentSize < mMinimumHeight )
setFixedHeight ( mMinimumHeight ) ;
else
setFixedHeight ( documentSize + mBottomMargin ) ;
if ( documentSize < mMinimumHeight ) {
setFixedHeight ( mMinimumHeight ) ;
} else {
setFixedHeight ( documentSize + mBottomMargin ) ;
}
updateGeometry ( ) ;
//to trig a resize on the tree widget item
@ -245,6 +249,7 @@ void UBTGAdaptableText::managePlaceholder(bool focus){
setTextColor ( QColor ( Qt : : black ) ) ;
setPlainText ( " " ) ;
}
setCursorToTheEnd ( ) ;
} else {
if ( toPlainText ( ) . isEmpty ( ) ) {
setTextColor ( QColor ( Qt : : lightGray ) ) ;
@ -253,6 +258,16 @@ void UBTGAdaptableText::managePlaceholder(bool focus){
}
}
void UBTGAdaptableText : : setCursorToTheEnd ( ) {
QTextDocument * doc = document ( ) ;
if ( NULL ! = doc ) {
QTextBlock block = doc - > lastBlock ( ) ;
QTextCursor cursor ( doc ) ;
cursor . setPosition ( block . position ( ) + block . length ( ) - 1 ) ;
setTextCursor ( cursor ) ;
}
}
/***************************************************************************
* class UBTGDraggableWeb *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@ -112,6 +112,7 @@ protected:
void focusOutEvent ( QFocusEvent * e ) ;
private :
void setCursorToTheEnd ( ) ;
int mBottomMargin ;
QTreeWidgetItem * mpTreeWidgetItem ;
int mMinimumHeight ;