Show latex button when the annotation popup window is opened

Check for latex contents after creating the MovableTitle, bacause it's in
MovableTitle ctor where the containsLatex signal is connected.
remotes/origin/KDE/4.9
Fabio D'Urso 14 years ago
parent d2fa4c9bf3
commit e130068726
  1. 6
      ui/annotwindow.cpp

@ -202,9 +202,6 @@ AnnotWindow::AnnotWindow( QWidget * parent, Okular::Annotation * annot, Okular::
if (!canEditAnnotation)
textEdit->setReadOnly(true);
m_latexRenderer = new GuiUtils::LatexRenderer();
emit containsLatex( GuiUtils::LatexRenderer::mightContainLatex( GuiUtils::contents( m_annot ) ) );
QVBoxLayout * mainlay = new QVBoxLayout( this );
mainlay->setMargin( 2 );
mainlay->setSpacing( 0 );
@ -217,6 +214,9 @@ AnnotWindow::AnnotWindow( QWidget * parent, Okular::Annotation * annot, Okular::
QSizeGrip * sb = new QSizeGrip( this );
lowerlay->addWidget( sb );
m_latexRenderer = new GuiUtils::LatexRenderer();
emit containsLatex( GuiUtils::LatexRenderer::mightContainLatex( GuiUtils::contents( m_annot ) ) );
m_title->setTitle( m_annot->window().summary() );
m_title->connectOptionButton( this, SLOT(slotOptionBtn()) );

Loading…
Cancel
Save