mirror of
https://invent.kde.org/graphics/okular
synced 2024-10-03 22:54:31 +00:00
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
This commit is contained in:
parent
93c1d3845d
commit
0cc0b192cd
5
part.cpp
5
part.cpp
|
@ -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()
|
||||
|
|
3
part.h
3
part.h
|
@ -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…
Reference in a new issue