#129 Shouldnt rewrt db if only chg is treestatus & its ignored

open
nobody
5
2012-09-17
2008-04-03
Kevin Goodwin
No

PWS 3.12 is rewriting the database when the only thing I've done is change the "tree status". This is annoying behavior because:

1) I am 'sharing this file with myself' using Subversion, and this behavior causes spurious "file is changed" events (and obviously there is no way to diff this file-type to see whether the user-data in the file has changed, vs. metadata such as this).

2) it is completely unnecessary because I have selected the option Manage, Options, Display, Initial Tree View=Fully collapsed, thus I am in effect saying "I don't care about the previous Tree View", so there is no motivation to write this metadata into the file because it will be ignored on the next startup anyway.

So, my request is to modify DboxMain::OnOK(). Within the statement:

if (autoSave && !m_core.IsReadOnly() &&
(m_bTSUpdated || m_core.WasDisplayStatusChanged()) &&
m_core.GetNumEntries() > 0)
Save();

the subexpression

m_core.WasDisplayStatusChanged()

would become

((PWSprefs::AsPerLastSave == GetPref(PWSprefs::TreeDisplayStatusAtOpen)) && m_core.WasDisplayStatusChanged())

This way, the db file is only rewritten if there is a change in the metadata AND the metadata is actually going to be used when the file is next opened.

I would build and test this myself except I have MSVStudio 2003 installed and cannot risk installing a newer version.

TIA, Kevin

Discussion

  • Logged In: NO

    I will never recommend this product & there is no way to uninstall it. Will have to have a tech uninstall it. Anyone who gives you a download with no way to uninstall is not credible. The ones with credibility at least state you cannot uninstall.