/*---------------------------------------------------------------------------------------------- Synchronize all windows in this application with any changes made in the database. @param sync -> The information describing a given change. ----------------------------------------------------------------------------------------------*/ bool CleDeSplitChild::Synchronize(SyncInfo & sync) { SuperClass::Synchronize(sync); switch(sync.msg) { case ksyncAddPss: case ksyncDelPss: case ksyncPossList: { RecMainWnd * prmw = dynamic_cast<RecMainWnd *>(MainWindow()); Assert(prmw); int chvo = prmw->Records().Size(); // Need to handle deleting last item. if (m_vdfe.Size()) { if (chvo && prmw->Records()[prmw->CurRecIndex()].hvo == m_vdfe[0]->GetOwner()) return true; // No change. // Otherwise our record has changed, so we need to redisplay the record. CloseAllEditors(); } if (chvo) SetRootObj(prmw->Records()[prmw->CurRecIndex()], true); ::InvalidateRect(m_hwnd, NULL, false); } return true; default: break; } return true; }
int ProjectFrame::CloseProject(int query) { if (theProject) { if (query && theProject->GetChange()) { if (QuerySaveProject() < 0) return 0; } if (CloseAllEditors() == 0) return 0; StopPlayer(); ClearPlayer(); prjTree->RemoveAll(); theProject->Release(); theProject = 0; } return 1; }