X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=src%2Fviews.cpp;h=9d2af66574be0219347e110b2edd811c2e2489d5;hb=1f72f3289ee6be64ec607ea93b4fcfe8b5dff3eb;hp=ba400e708a4cf336038b2d2bc07dcdbe3276b3fd;hpb=56a484768937a8cb38203516f85106c778aaa97b;p=ctsim.git diff --git a/src/views.cpp b/src/views.cpp index ba400e7..9d2af66 100644 --- a/src/views.cpp +++ b/src/views.cpp @@ -9,7 +9,7 @@ ** This is part of the CTSim program ** Copyright (c) 1983-2001 Kevin Rosenberg ** -** $Id: views.cpp,v 1.94 2001/01/31 01:01:22 kevin Exp $ +** $Id: views.cpp,v 1.98 2001/02/04 21:28:19 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 @@ -932,7 +932,6 @@ bool ImageFileView::OnCreate (wxDocument *doc, long WXUNUSED(flags) ) { m_pFrame = CreateChildFrame(doc, this); - (m_pFrame); m_bMinSpecified = false; m_bMaxSpecified = false; @@ -1032,7 +1031,7 @@ ImageFileView::OnClose (bool deleteWindow) SetFrame(NULL); if (deleteWindow) { - m_pFrame->Destroy(); + delete m_pFrame; m_pFrame = NULL; if (GetDocument() && GetDocument()->getBadFileOpen()) ::wxYield(); // wxWindows bug workaround @@ -1125,8 +1124,13 @@ ImageFileView::OnConvert3d (wxCommandEvent& event) Graph3dFileDocument* pGraph3d = theApp->newGraph3dDoc(); pGraph3d->setBadFileOpen(); pGraph3d->createFromImageFile (rIF); - pGraph3d->getView()->getFrame()->SetClientSize (200, 200); + pGraph3d->getView()->OnUpdate (this, NULL); + pGraph3d->UpdateAllViews(); + pGraph3d->getView()->getFrame()->SetClientSize (400, 400); pGraph3d->getView()->getFrame()->Show (true); + GetDocumentManager()->ActivateView (pGraph3d->getView(), true, false); + ::wxYield(); + pGraph3d->getView()->getCanvas()->SetFocus(); } #endif @@ -1846,7 +1850,10 @@ PhantomFileView::OnProjections (wxCommandEvent& event) Scanner theScanner (rPhantom, sGeometry.c_str(), m_iDefaultNDet, m_iDefaultNView, m_iDefaultNSample, m_dDefaultRotation, m_dDefaultFocalLength, m_dDefaultFieldOfView); if (theScanner.fail()) { - *theApp->getLog() << "Failed making scanner: " << theScanner.failMessage().c_str() << "\n"; + wxString msg = "Failed making scanner\n"; + msg += theScanner.failMessage().c_str(); + *theApp->getLog() << msg << "\n"; + wxMessageBox (msg, "Error"); return; } pProj->initFromScanner (theScanner); @@ -2165,7 +2172,7 @@ EVT_MENU(PJMENU_CONVERT_FFT_POLAR, ProjectionFileView::OnConvertFFTPolar) END_EVENT_TABLE() ProjectionFileView::ProjectionFileView() -: wxView(), m_pCanvas(NULL), m_pFrame(NULL), m_pFileMenu(0) +: wxView(), m_pFrame(0), m_pCanvas(0), m_pFileMenu(0) { #ifdef DEBUG m_iDefaultNX = 115;