X-Git-Url: http://git.kpe.io/?p=ctsim.git;a=blobdiff_plain;f=src%2Fviews.cpp;h=3a91f6eaa76d63c0efb53fba8488529b856cdb68;hp=03d366d97bfc74935215a3924fc94e4b8d40b555;hb=21a3eb69ff13b601703cfdcca278a3f60e949737;hpb=24bebb53a7d49b98c76f1083f942b122c0e0bf5d diff --git a/src/views.cpp b/src/views.cpp index 03d366d..3a91f6e 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.152 2002/05/03 01:01:15 kevin Exp $ +** $Id: views.cpp,v 1.153 2002/05/03 09:57:41 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 @@ -2173,18 +2173,6 @@ PhantomFileView::OnProjections (wxCommandEvent& event) return; } pProjectionDoc->setProjections (pProj); - ProjectionFileView* projView = pProjectionDoc->getView(); - if (projView) { - projView->OnUpdate (projView, NULL); - if (projView->getCanvas()) - projView->getCanvas()->SetClientSize (m_iDefaultNDet, m_iDefaultNView); - if (wxFrame* pFrame = projView->getFrame()) { - pFrame->Show(true); - pFrame->SetFocus(); - pFrame->Raise(); - } - GetDocumentManager()->ActivateView (projView, true, false); - } if (theApp->getAskDeleteNewDocs()) pProjectionDoc-> Modify(true); pProjectionDoc->UpdateAllViews (this); @@ -3107,7 +3095,7 @@ void ProjectionFileView::setInitialClientSize () { wxSize bestSize = m_pCanvas->GetBestSize(); - + if (bestSize.x > 800) bestSize.x = 800; if (bestSize.y > 800) @@ -3159,16 +3147,13 @@ ProjectionFileView::OnUpdate (wxView *WXUNUSED(sender), wxObject *WXUNUSED(hint) wxImage image (nDet, nView, imageData, true); m_bitmap = image.ConvertToBitmap(); delete imageData; - //int xSize = nDet; - //int ySize = nView; - //xSize = clamp (xSize, 0, 800); - //ySize = clamp (ySize, 0, 800); - //m_pFrame->SetClientSize (xSize, ySize); - m_pCanvas->SetScrollbars (20, 20, nDet/20, nView/20); } - if (m_pCanvas) - m_pCanvas->Refresh(); + m_pCanvas->SetScrollbars(20, 20, nDet/20, nView/20); + m_pCanvas->SetBackgroundColour(*wxWHITE); + + if (m_pCanvas) + m_pCanvas->Refresh(); } bool