On Tuesday 27 May 2003 11:03, David Faure wrote: > On Saturday 24 May 2003 21:19, Ariya Hidayat wrote: > > > Please put "diff -up" in your ~/.cvsrc ... > > > > The patch for koMainWindow.cc now looks like this: > > > > @@ -1283,21 +1283,21 @@ void KoMainWindow::slotCloseAllViews() { > > // Attention: Very touchy code... you know what you're doing? > > Goooood :) d->m_forQuit=true; > > if(queryClose()) { > > - hide(); > > - d->m_rootDoc->removeShell(this); > > // In case the document is embedded we close all open > > "extra-shells" if(d->m_rootDoc && d->m_rootDoc->isEmbedded()) { > > + hide(); > > + d->m_rootDoc->removeShell(this); > > QPtrListIterator it(d->m_rootDoc->shells()); > > while (it.current()) { > > it.current()->hide(); > > delete it.current(); // this updates the lists' current > > pointer and thus // the iterator (the shell dtor calls removeShell) + > > d->m_rootDoc=0; > > } > > } > > // not embedded -> destroy the document and all shells/views ;) > > else > > - delete d->m_rootDoc; > > - d->m_rootDoc=0; > > + setRootDocument( 0L ); > > close(); // close this window (and quit the app if necessary) > > } > > d->m_forQuit=false; > > Difficult to proof-read without debugging it myself. I'll trust you that it > works :) Werner wrote this code, I was hoping he would be able to react on > this... Feel free to commit. Well, since the time I wrote that code the semantics of queryClose(), hide() and so on changed at least two times, which makes it rather complex to understand and debug. Ariya: How did you test the code? Using different embedded (active) parts and some external views of those embedded parts (View -> New View on the embedded part)? I unfortunately don't have any time to test, so if you think it's fine please go ahead. Ciao, Werner _______________________________________________ koffice-devel mailing list koffice-devel@mail.kde.org http://mail.kde.org/mailman/listinfo/koffice-devel