No need to prepare for reloading if there's nothing to reload

Part of review 108404
The other part was fixed in the previous commit in a different way
REVIEW: 108404
remotes/origin/epub-qtextdoc
Jaydeep Solanki 13 years ago committed by Albert Astals Cid
parent 4fefc60e35
commit 54b4a20e07
  1. 3
      ui/toc.cpp

@ -84,6 +84,9 @@ void TOC::notifyCurrentPageChanged( int, int )
void TOC::prepareForReload() void TOC::prepareForReload()
{ {
if( m_model->isEmpty() )
return;
const QVector<QModelIndex> list = expandedNodes(); const QVector<QModelIndex> list = expandedNodes();
TOCModel *m = m_model; TOCModel *m = m_model;
m_model = new TOCModel( m_document, m_treeView ); m_model = new TOCModel( m_document, m_treeView );

Loading…
Cancel
Save