diff --git a/ui/annotwindow.cpp b/ui/annotwindow.cpp index d0bcc8f86..2b11e2569 100644 --- a/ui/annotwindow.cpp +++ b/ui/annotwindow.cpp @@ -195,9 +195,10 @@ AnnotWindow::AnnotWindow( QWidget * parent, Annotation * annot) connect(textEdit,SIGNAL(textChanged()), this,SLOT(slotsaveWindowText())); - setPalette( QPalette(m_annot->style.color)); + QColor col = m_annot->style.color.isValid() ? m_annot->style.color : Qt::yellow; + setPalette( QPalette( col ) ); QPalette pl=textEdit->palette(); - pl.setColor(QPalette::Base,m_annot->style.color); + pl.setColor( QPalette::Base, col ); textEdit->setPalette(pl); QVBoxLayout * mainlay = new QVBoxLayout( this );