Commit 0cc0b192 authored by Tobias Koenig's avatar Tobias Koenig

Don't open multiple presentation widgets when slotShowPresentation() is called

multiple times (e.g. when the watched PDF has changed)

svn path=/trunk/kdegraphics/kpdf/; revision=383178
parent 93c1d384
......@@ -687,7 +687,10 @@ void Part::slotShowProperties()
void Part::slotShowPresentation()
{
new PresentationWidget( m_document );
if ( m_presentationWidget )
delete (PresentationWidget*) m_presentationWidget;
m_presentationWidget = new PresentationWidget( m_document );
}
void Part::slotPrint()
......
......@@ -18,6 +18,7 @@
#include <kparts/browserextension.h>
#include <kparts/part.h>
#include <qguardedptr.h>
#include "core/observer.h"
#include "dcop.h"
......@@ -38,6 +39,7 @@ class KPDFDocument;
class ThumbnailList;
class ThumbnailController;
class PageView;
class PresentationWidget;
class SearchWidget;
namespace KPDF {
......@@ -123,6 +125,7 @@ private:
SearchWidget *m_searchWidget;
ThumbnailList *m_thumbnailList;
PageView *m_pageView;
QGuardedPtr<PresentationWidget> m_presentationWidget;
// static instances counter
static unsigned int m_count;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment