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
remotes/origin/kpdf-3.4
Tobias Koenig 21 years ago
parent 93c1d3845d
commit 0cc0b192cd
  1. 5
      part.cpp
  2. 3
      part.h

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

Loading…
Cancel
Save