delete the internal doc when we close the document, not when we open the new one

svn path=/trunk/KDE/kdegraphics/okular/; revision=686242
remotes/origin/KDE/4.0
Pino Toscano 19 years ago
parent f2ce8de556
commit a71f01234b
  1. 6
      generators/ghostview/generator_ghostview.cpp

@ -201,6 +201,9 @@ bool GSGenerator::loadDocument( const QString & fileName, QVector< Okular::Page
bool GSGenerator::closeDocument()
{
delete internalDoc;
internalDoc = 0;
return true;
}
@ -322,9 +325,6 @@ bool GSGenerator::loadPages( QVector< Okular::Page * > & pagesVector )
bool GSGenerator::loadDocumentWithDSC( const QString & name, QVector< Okular::Page * > & pagesVector, bool ps )
{
// delete the old document to make room for the new one
delete internalDoc;
internalDoc = new GSInternalDocument (name, ps ? GSInternalDocument::PS : GSInternalDocument::PDF);
pagesVector.resize( internalDoc->dsc()->page_count() );
kDebug() << "Page count: " << internalDoc->dsc()->page_count() << endl;

Loading…
Cancel
Save