Summary: | Unsaved changes icon disappears even if save could not be performed. | ||
---|---|---|---|
Product: | [Applications] kdevelop | Reporter: | Robin Stevens <robin> |
Component: | general | Assignee: | KDevelop Developers <kdevelop-devel> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | 3.0.0b2 | ||
Target Milestone: | --- | ||
Platform: | Debian testing | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Attachments: | patch |
Description
Robin Stevens
2004-01-13 15:22:57 UTC
Created attachment 4144 [details]
patch
Right, we noticed yesterday. This patch should solve that, but CVS is in deep
freeze.. :/
Subject: kdevelop/src CVS commit by dagerbo: Fixes bug 72552. CCMAIL: 72552-done@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") ); } } |