[Uml-devel] kdesdk/umbrello/umbrello

Jonathan Riddell jri at jriddell.org
Mon Dec 22 09:23:04 UTC 2003


CVS commit by jriddell: 

Fix beastie 69168
There is no user feedback to know when the document has been modified when the saved version is up to date.


  M +5 -3      uml.cpp   1.83
  M +4 -4      umldoc.cpp   1.110


--- kdesdk/umbrello/umbrello/uml.cpp  #1.82:1.83
@@ -850,13 +850,15 @@ WorkToolBar* UMLApp::getWorkToolBar() {
 }
 ////////////////////////////////////////////////////////////////////////////////////////////////////
-void UMLApp::setModified(bool _m) {
-        //fileSave -> setEnabled(_m);
+void UMLApp::setModified(bool modified) {
+        //fileSave -> setEnabled(modified);
 
         //if anything else needs to be done on a mofication, put it here
 
         // printing should be possible whenever there is something to print
-        if ( _m == true && doc->getCurrentView() )  {
+        if ( modified == true && doc->getCurrentView() )  {
                 enablePrint(true);
         }
+
+        setCaption(doc->URL().fileName(), modified); //add disk icon to taskbar if modified
 }
 ////////////////////////////////////////////////////////////////////////////////////////////////////

--- kdesdk/umbrello/umbrello/umldoc.cpp  #1.109:1.110
@@ -2316,8 +2316,8 @@ void UMLDoc::loadUndoData() {
                 undoStack.setAutoDelete(true);
                 if (undoStack.count() <= 1) {
-                        ((UMLApp*)parent())->enableUndo(false);
+                        UMLApp::app()->enableUndo(false);
                 }
                 if (redoStack.count() >= 1) {
-                        ((UMLApp*)parent())->enableRedo(true);
+                        UMLApp::app()->enableRedo(true);
                 }
                 while (undoStack.count() > undoMax) {
@@ -2352,8 +2352,8 @@ void UMLDoc::loadRedoData() {
                 redoStack.setAutoDelete(true);
                 if (redoStack.count() < 1) {
-                        ((UMLApp*)parent())->enableRedo(false);
+                        UMLApp::app()->enableRedo(false);
                 }
                 if (undoStack.count() > 1) {
-                        ((UMLApp*)parent())->enableUndo(true);
+                        UMLApp::app()->enableUndo(true);
                 }
                 if (currentView->getID() != currentViewID) {






More information about the umbrello-devel mailing list