SVN commit 637709 by amantia: Fix crash when dropping a document template on an Untitled empty document by removing the hack to destroy/recreate the document if it is empty and Untitled. From my POV this case in handled, but if the Kate devels want, they can reopen the report. BUG: 141908 M +1 -0 ChangeLog M +2 -2 quanta.kdevelop M +10 -16 src/quantadoc.cpp --- branches/KDE/3.5/kdewebdev/quanta/ChangeLog #637708:637709 @@ -3,6 +3,7 @@ Version 3.5.7 (Release date: xx-xx-2006; Started 06-02-2006) - bugfixes: - fix directory creation when certain ftp servers are used [#141232] + - fix crash when dropping a document template on an Untitled empty document [#141908] - improvements: - autocompletion for member variables. Patch by Andrew Lowe . --- branches/KDE/3.5/kdewebdev/quanta/quanta.kdevelop #637708:637709 @@ -259,10 +259,10 @@ - + Quanta speicfic header - + A new empty C++ file. --- branches/KDE/3.5/kdewebdev/quanta/src/quantadoc.cpp #637708:637709 @@ -99,29 +99,23 @@ QuantaView *view = ViewManager::ref()->isOpened(url); if (!view || newfile) { +/* // no modi and new -> we can remove !!!! w = ViewManager::ref()->activeDocument(); if (w && !w->isModified() && w->isUntitled() && !w->busy) { - //workaround for some strange Katepart behavior. If there is a highlighting mode - //selected and new content is loaded, the highlighting is reset to None. To avoid this - //remove the untitled document and create a new one, where we don't set the - //highlighting - ViewManager::ref()->removeActiveView(false); - w = ViewManager::ref()->activeDocument(); + //workaround for some strange Katepart behavior. If there is a highlighting mode + //selected and new content is loaded, the highlighting is reset to None. To avoid this + //remove the untitled document and create a new one, where we don't set the + //highlighting + ViewManager::ref()->removeActiveView(false); + w = ViewManager::ref()->activeDocument(); - /* - KTextEditor::HighlightingInterface* highlightIf = dynamic_cast(w->doc()); - if (highlightIf) - { - highlightIf->setHlMode(0); + if (w && !w->isModified() && w->isUntitled() && !w->busy) + return true; } - */ - if (w && !w->isModified() && w->isUntitled() && !w->busy) - return true; - } - +*/ // now we can create new kwrite ViewManager::ref()->createNewDocument(); view = ViewManager::ref()->activeView();