From b9b3adc9c46f17e0fb3409ac682af5cd968089b8 Mon Sep 17 00:00:00 2001 From: guy <guy@c028cbd2-c16b-5b4b-a496-9718f37d4682> Date: Mon, 9 Oct 2006 14:45:09 +0000 Subject: [PATCH] Patch level : 4.0 Files correlati : xvaga.dll Ricompilazione Demo : [ ] Commento : Migliorata chiusura stampanti moderne. A volte provocava il mancato aggiornamento del flag di stamapo sui documenti. git-svn-id: svn://10.65.10.50/trunk@14375 c028cbd2-c16b-5b4b-a496-9718f37d4682 --- xvaga/xvtextra.cpp | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/xvaga/xvtextra.cpp b/xvaga/xvtextra.cpp index 8980c588c..6235a201a 100755 --- a/xvaga/xvtextra.cpp +++ b/xvaga/xvtextra.cpp @@ -132,7 +132,10 @@ void TwxPrintOut::ResetDC() { wxDC* dc = GetDC(); if (dc != NULL) + { delete dc; + SetDC(NULL); + } } #if wxCHECK_VERSION(2,6,1) @@ -237,7 +240,7 @@ void TwxPrintOut::InitDC(const TPRINT_RCD* prcd, const char* title) wxSize s = dc->GetPPI(); if (s.x >0) - SetPPIPrinter(s.x, s.y); + SetPPIPrinter(s.x, s.y); s = dc->GetSize(); if (s.x > 0) @@ -281,8 +284,8 @@ public: bool Locked() const { return m_bLocked; } bool Printing() const { return Ok() && Locked(); } - TwxPrintOutCache() : m_signature(0), m_po(NULL) { } - ~TwxPrintOutCache() { Reset(); } + TwxPrintOutCache(); + ~TwxPrintOutCache(); } m_PrintoutCache; unsigned long TwxPrintOutCache::Signature(const TPRINT_RCD* prcd) const @@ -336,6 +339,15 @@ TwxPrintOut& TwxPrintOutCache::Get(const TPRINT_RCD* prcd) return *m_po; } +TwxPrintOutCache::TwxPrintOutCache() : m_signature(0), m_po(NULL) +{ } + +TwxPrintOutCache::~TwxPrintOutCache() +{ + // Reset(); // Essendo un oggetto statico la delete m_po non funziona! +} + + /////////////////////////////////////////////////////////// // TPrintDC ///////////////////////////////////////////////////////////