[Bug 72552] Unsaved changes icon disappears even if save could not be performed.

Jens Dagerbo jens.dagerbo at swipnet.se
Wed Jan 21 09:12:04 UTC 2004


------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
      
http://bugs.kde.org/show_bug.cgi?id=72552      
jens.dagerbo at swipnet.se changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED



------- Additional Comments From jens.dagerbo at swipnet.se  2004-01-21 09:11 -------
Subject: kdevelop/src

CVS commit by dagerbo: 

Fixes bug 72552.

CCMAIL: 72552-done at bugs.kde.org


  M +10 -6     partcontroller.cpp   1.112


--- kdevelop/src/partcontroller.cpp  #1.111:1.112
@@ -1127,14 +1127,18 @@ void PartController::slotFileDirty( cons
         kdDebug(9000) << k_funcinfo << endl;
         
-        KParts::ReadOnlyPart * ro_part = dynamic_cast<KParts::ReadOnlyPart*>( partForURL( url ) );
-        if ( !ro_part || !ro_part->widget() ) return;
+        KParts::ReadWritePart * rw_part = dynamic_cast<KParts::ReadWritePart*>( partForURL( url ) );
+        if ( !rw_part || !rw_part->widget() ) return;
         
-        if ( isDirty( ro_part ) ) 
+        if ( isDirty( rw_part ) ) 
         {
-                ro_part->widget()->setIcon( SmallIcon("revert") );
+                rw_part->widget()->setIcon( SmallIcon("revert") );
+        } 
+        else if ( !rw_part->isModified() )
+        {
+                rw_part->widget()->setIcon( SmallIcon("kdevelop") );
         } 
         else 
         {
-                ro_part->widget()->setIcon( SmallIcon("kdevelop") );
+                rw_part->widget()->setIcon( SmallIcon("filesave") );
         }
 }




More information about the KDevelop-devel mailing list