[Uml-devel] kdesdk/umbrello/umbrello
Jonathan Riddell
jri at jriddell.org
Tue Feb 18 11:26:04 UTC 2003
CVS commit by jriddell:
Redo no longer crashes the programme
M +10 -12 umldoc.cpp 1.10
--- kdesdk/umbrello/umbrello/umldoc.cpp #1.9:1.10
@@ -322,15 +322,16 @@ bool UMLDoc::saveDocument(const KURL& ur
void UMLDoc::deleteContents() {
m_Doc = "";
- DocWindow *dw = getDocWindow();
- if( dw)
- dw -> newDocumentation( );
+ DocWindow* dw = getDocWindow();
+ if (dw) {
+ dw->newDocumentation();
+ }
- if(listView) {
- listView -> init();
+ if (listView) {
+ listView->init();
removeAllViews();
- if(objectList.count() > 0)
+ if(objectList.count() > 0) {
objectList.clear();
}
- return;
+ }
}
////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -1686,11 +1687,8 @@ void UMLDoc::addToUndoStack() {
void UMLDoc::clearUndoStack() {
undoStack.setAutoDelete(true);
- redoStack.setAutoDelete(true);
undoStack.clear();
- redoStack.clear();
((UMLApp*)parent())->enableRedo(false);
- ((UMLApp*)parent())->enableUndo(false);
undoStack.setAutoDelete(false);
- redoStack.setAutoDelete(false);
+ clearRedoStack();
}
@@ -1741,6 +1739,6 @@ void UMLDoc::loadRedoData() {
if (redoStack.count() >= 1) {
int currentViewID = currentView->getID();
- deleteContents();
loading = true;
+ deleteContents();
undoStack.prepend( redoStack.getFirst() );
QDataStream* redoData = redoStack.getFirst();
More information about the umbrello-devel
mailing list