- fix: project's modified flag not cleared after saved
This commit is contained in:
parent
92fcd9b923
commit
da27fba8f1
1
NEWS.md
1
NEWS.md
|
@ -1,6 +1,7 @@
|
||||||
Version 0.10.0 For Dev-C++ 7 Beta
|
Version 0.10.0 For Dev-C++ 7 Beta
|
||||||
- enhancement: use gdb/mi interface to communicate with gdb debug session
|
- enhancement: use gdb/mi interface to communicate with gdb debug session
|
||||||
- enhancement: better display of watch vars
|
- enhancement: better display of watch vars
|
||||||
|
- fix: project's modified flag not cleared after saved
|
||||||
|
|
||||||
Version 0.9.3 For Dev-C++ 7 Beta
|
Version 0.9.3 For Dev-C++ 7 Beta
|
||||||
- fix: the count in the title of issues view isn't correct
|
- fix: the count in the title of issues view isn't correct
|
||||||
|
|
|
@ -107,8 +107,9 @@ bool Project::modified() const
|
||||||
|
|
||||||
// Otherwise, check all units
|
// Otherwise, check all units
|
||||||
foreach (const PProjectUnit& unit, mUnits){
|
foreach (const PProjectUnit& unit, mUnits){
|
||||||
if (unit->modified())
|
if (unit->modified()) {
|
||||||
return true;
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -184,10 +185,7 @@ void Project::setFileName(QString value)
|
||||||
|
|
||||||
void Project::setModified(bool value)
|
void Project::setModified(bool value)
|
||||||
{
|
{
|
||||||
QFile file(mFilename);
|
if (mModified!=value) {
|
||||||
// only mark modified if *not* read-only
|
|
||||||
if (!file.exists()
|
|
||||||
|| (file.exists() && file.isWritable())) {
|
|
||||||
mModified=value;
|
mModified=value;
|
||||||
emit modifyChanged(mModified);
|
emit modifyChanged(mModified);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue