mirror of
https://invent.kde.org/graphics/okular
synced 2024-10-05 23:49:20 +00:00
globalParam is only one variable, so we can't delete it when there are two instances of the part running.
That fixes bug 81442 CCMAIL:81442-done@bugs.kde.org svn path=/trunk/kdegraphics/kpdf/; revision=341419
This commit is contained in:
parent
f705005d2f
commit
04ebb98aa2
|
@ -36,6 +36,8 @@ K_EXPORT_COMPONENT_FACTORY(libkpdfpart, KPDFPartFactory)
|
|||
|
||||
using namespace KPDF;
|
||||
|
||||
unsigned int Part::m_count = 0;
|
||||
|
||||
Part::Part(QWidget *parentWidget, const char *widgetName,
|
||||
QObject *parent, const char *name,
|
||||
const QStringList & /*args*/ )
|
||||
|
@ -144,12 +146,15 @@ Part::Part(QWidget *parentWidget, const char *widgetName,
|
|||
connect( m_outputDev, SIGNAL( spacePressed() ), this, SLOT( slotReadDown() ) );
|
||||
readSettings();
|
||||
updateActionPage();
|
||||
m_count++;
|
||||
}
|
||||
|
||||
Part::~Part()
|
||||
{
|
||||
delete globalParams;
|
||||
m_count--;
|
||||
if (m_count == 0) delete globalParams;
|
||||
writeSettings();
|
||||
delete m_doc;
|
||||
}
|
||||
|
||||
void Part::slotZoom( const QString&nz )
|
||||
|
|
|
@ -135,6 +135,8 @@ namespace KPDF
|
|||
float m_zoomFactor;
|
||||
int m_nextThumbnail;
|
||||
|
||||
static unsigned int m_count;
|
||||
|
||||
private slots:
|
||||
void slotFitToWidthToggled();
|
||||
void redrawPage();
|
||||
|
|
Loading…
Reference in a new issue