X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=src%2Fctsim.cpp;h=7a8d50551002855df42b55be9821f134358ee976;hb=5e6c61b9ab5a05fff344b1aacf70e5ff61b81060;hp=e96746c0206840e1fb3ee2c417011b227d9ba516;hpb=38ff0dd072e5929bf4a204982f858049dff09b81;p=ctsim.git diff --git a/src/ctsim.cpp b/src/ctsim.cpp index e96746c..7a8d505 100644 --- a/src/ctsim.cpp +++ b/src/ctsim.cpp @@ -9,7 +9,7 @@ ** This is part of the CTSim program ** Copyright (C) 1983-2000 Kevin Rosenberg ** -** $Id: ctsim.cpp,v 1.51 2001/01/27 22:10:11 kevin Exp $ +** $Id: ctsim.cpp,v 1.53 2001/01/28 04:24:03 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 @@ -70,7 +70,7 @@ #endif #endif -static const char* rcsindent = "$Id: ctsim.cpp,v 1.51 2001/01/27 22:10:11 kevin Exp $"; +static const char* rcsindent = "$Id: ctsim.cpp,v 1.53 2001/01/28 04:24:03 kevin Exp $"; struct option CTSimApp::ctsimOptions[] = { @@ -189,7 +189,7 @@ CTSimApp::OnInit() *m_pLog << "Cannot initialize the Windows Help system\n"; #endif if (! m_pFrame->getHtmlHelpController().Initialize(::wxGetCwd() + "/ctsim")) - *m_pLog << "Cannot initialize the HTML Help system"; + *m_pLog << "Cannot initialize the HTML Help system\n"; return true; } @@ -371,6 +371,7 @@ MainFrame::~MainFrame() if (theApp->getConfig()) theApp->getDocManager()->FileHistorySave (*theApp->getConfig()); delete theApp->getDocManager(); + } void @@ -441,7 +442,7 @@ MainFrame::OnCreateFilter (wxCommandEvent& WXUNUSED(event)) << ", inputScale=" << m_dDefaultFilterInputScale << ", outputScale=" << m_dDefaultFilterOutputScale; *theApp->getLog() << os.str().c_str() << "\n"; wxString filename = "untitled.if"; - ImageFileDocument* pFilterDoc = dynamic_cast(theApp->getDocManager()->CreateDocument ("untitled.if", wxDOC_SILENT)); + ImageFileDocument* pFilterDoc = theApp->newImageDoc(); if (! pFilterDoc) { sys_error (ERR_SEVERE, "Unable to create filter image"); return; @@ -454,6 +455,8 @@ MainFrame::OnCreateFilter (wxCommandEvent& WXUNUSED(event)) pFilterDoc->Modify (true); pFilterDoc->UpdateAllViews(); pFilterDoc->GetFirstView()->OnUpdate (NULL, NULL); + pFilterDoc->getView()->getFrame()->SetClientSize(m_iDefaultFilterXSize, m_iDefaultFilterYSize); + pFilterDoc->getView()->getFrame()->Show(true); } }