** This is part of the CTSim program
** Copyright (C) 1983-2000 Kevin Rosenberg
**
-** $Id: sgp.cpp,v 1.9 2000/08/02 18:06:00 kevin Exp $
+** $Id: sgp.cpp,v 1.10 2000/08/25 15:59:13 kevin Exp $
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License (version 2) as
SGP::SGP (const SGPDriver& driver)
: m_driver (driver)
+#if HAVE_WXWINDOWS
+ , m_pPen(NULL)
+#endif
{
m_iPhysicalXSize = m_driver.getPhysicalXSize();
m_iPhysicalYSize = m_driver.getPhysicalYSize();
#if HAVE_WXWINDOWS
if (m_driver.isWX()) {
wxColor colour (s_aRGBColor[icol].getRed(), s_aRGBColor[icol].getGreen(), s_aRGBColor[icol].getBlue());
- wxPen pen (colour, 1, wxSOLID);
- m_driver.idWX()->SetPen (pen);
+ delete m_pPen;
+ m_pPen = new wxPen (colour, 1, wxSOLID);
+ m_driver.idWX()->SetPen (*m_pPen);
}
#endif
}