use a standard color (yellow) when the annotation color is not defined

svn path=/trunk/playground/graphics/okular/; revision=585682
This commit is contained in:
Pino Toscano 2006-09-17 18:22:00 +00:00
parent dc2c0bef27
commit 27dc15c960

View file

@ -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 );