From b96b43f48b5b323698a6bcfa579e75d0059332b6 Mon Sep 17 00:00:00 2001 From: mark-sil <83427558+mark-sil@users.noreply.github.com> Date: Fri, 9 Oct 2026 07:40:36 -0400 Subject: [PATCH 1/2] Stop broadcasting PropertyTable changes that nothing handles PropertyTable.SetProperty with the broadcast flag queues a Mediator "OnPropertyChanged" job for every changed value, even when no registered colleague has a branch for that name. An inventory of every production SetProperty/SetDefault site against every OnPropertyChanged handler found 113 such sites: dialog geometry, persisted column lists and widths, clerk bookkeeping (RecordClerk-, -Index, filter and sorter ids), startup singletons (window, cache, App, HelpTopicProvider) and the like. Those sites now pass false for the broadcast flag. The value, settings group and persistence calls are unchanged, so the stored state is the same; only the pointless queued job goes away. This is groundwork for moving the remaining OnPropertyChanged traffic to Pub/Sub: the 63 sites that do reach a handler are untouched, as are the XML-driven families (Choice.OnClick, ChoiceGroup, xWindow.LoadDefaultProperties and LinkListener.FollowActiveLink), whose members are decided one by one. Two sites are dead by context rather than by name. InfoPane sets ActiveClerk in the Texts & Words tools, where the only ActiveClerk handler, ReversalClerk, is never a message target. XmlDocConfigureDlg sets the layout property it was opened for, which can only be NotebookPublicationLayout (the Notebook Document tool) or null (the segment preview in Find Example Sentences has no layoutProperty), and neither name has a handler. RecordClerk.ResetStatusBarPanel keeps its broadcast: three of its four callers reach xWindow's status panels. Co-Authored-By: Claude Fable 5.1 --- Src/Common/Controls/DetailControls/Slice.cs | 4 +-- Src/Common/Controls/XMLViews/BrowseViewer.cs | 4 +-- .../XMLViews/ReallySimpleListChooser.cs | 2 +- Src/Common/Controls/XMLViews/SearchEngine.cs | 2 +- .../Controls/XMLViews/XmlBrowseViewBaseVc.cs | 4 +-- Src/Common/FieldWorks/FieldWorks.cs | 4 +-- .../LexicalProvider/LexicalProviderImpl.cs | 12 ++++----- Src/FdoUi/Dialogs/MergeObjectDlg.cs | 4 +-- Src/FdoUi/LexEntryUi.cs | 4 +-- Src/FwCoreDlgs/FwFindReplaceDlg.cs | 4 +-- Src/LexText/Discourse/ConstituentChart.cs | 4 +-- .../FlexPathwayPlugin/FlexPathwayPlugin.cs | 2 +- Src/LexText/Interlinear/ComplexConcControl.cs | 2 +- Src/LexText/Interlinear/FilterTextsDialog.cs | 2 +- Src/LexText/Interlinear/InfoPane.cs | 2 +- .../Interlinear/InterlinDocForAnalysis.cs | 2 +- .../Interlinear/InterlinDocRootSiteBase.cs | 2 +- Src/LexText/Interlinear/RawTextPane.cs | 2 +- .../Interlinear/SandboxBase.designer.cs | 2 +- Src/LexText/LexTextControls/BaseGoDlg.cs | 4 +-- .../LexTextControls/CombineImportDlg.cs | 2 +- .../DataNotebook/NotebookImportWiz.cs | 6 ++--- Src/LexText/LexTextControls/LiftImportDlg.cs | 4 +-- .../LexTextControls/MasterCategoryListDlg.cs | 4 +-- Src/LexText/LexTextControls/MasterListDlg.cs | 4 +-- Src/LexText/LexTextControls/MsaCreatorDlg.cs | 2 +- .../MsaInflectionFeatureListDlg.cs | 4 +-- .../PhonologicalFeatureChooserDlg.cs | 4 +-- Src/LexText/LexTextDll/AreaListener.cs | 4 +-- Src/LexText/Lexicon/FLExBridgeListener.cs | 10 +++---- Src/LexText/Lexicon/ReversalListener.cs | 2 +- .../Lexicon/SwapLexemeWithAllomorphDlg.cs | 2 +- Src/LexText/Morphology/ConcordanceDlg.cs | 4 +-- Src/LexText/Morphology/MorphologyListener.cs | 2 +- Src/LexText/Morphology/RespellerDlg.cs | 2 +- Src/XCore/FlexUIAdapter/AdapterBase.cs | 2 +- Src/XCore/FlexUIAdapter/ToolbarAdapter.cs | 2 +- .../xCoreInterfaces/PersistenceProvider.cs | 2 +- Src/XCore/xWindow.cs | 22 ++++++++-------- Src/xWorks/ExportDialog.cs | 10 +++---- Src/xWorks/FwXWindow.cs | 8 +++--- Src/xWorks/GlobalSettingServices.cs | 2 +- Src/xWorks/InterestingTextList.cs | 4 +-- Src/xWorks/LinkListener.cs | 6 ++--- Src/xWorks/RecordBrowseView.cs | 4 +-- Src/xWorks/RecordClerk.cs | 26 +++++++++---------- Src/xWorks/RecordEditView.cs | 2 +- Src/xWorks/RecordList.cs | 4 +-- Src/xWorks/TextListeners.cs | 2 +- Src/xWorks/XhtmlDocView.cs | 2 +- Src/xWorks/XmlDocConfigureDlg.cs | 2 +- Src/xWorks/XmlDocView.cs | 2 +- 52 files changed, 113 insertions(+), 113 deletions(-) diff --git a/Src/Common/Controls/DetailControls/Slice.cs b/Src/Common/Controls/DetailControls/Slice.cs index 8d850d9a1a..4ac0328e7e 100644 --- a/Src/Common/Controls/DetailControls/Slice.cs +++ b/Src/Common/Controls/DetailControls/Slice.cs @@ -1547,7 +1547,7 @@ public virtual void Expand(int iSlice) Expansion = DataTree.TreeItemState.ktisExpanded; if (m_propertyTable != null) { - m_propertyTable.SetProperty(ExpansionStateKey, true, true); + m_propertyTable.SetProperty(ExpansionStateKey, true, false); } } finally @@ -1601,7 +1601,7 @@ public virtual void Collapse(int iSlice) Expansion = DataTree.TreeItemState.ktisCollapsed; if (m_propertyTable != null) { - m_propertyTable.SetProperty(ExpansionStateKey, false, true); + m_propertyTable.SetProperty(ExpansionStateKey, false, false); } } finally diff --git a/Src/Common/Controls/XMLViews/BrowseViewer.cs b/Src/Common/Controls/XMLViews/BrowseViewer.cs index 2654429df1..7f4fa72836 100644 --- a/Src/Common/Controls/XMLViews/BrowseViewer.cs +++ b/Src/Common/Controls/XMLViews/BrowseViewer.cs @@ -2195,7 +2195,7 @@ private void SaveColumnWidths() { int nNewWidth = m_lvHeader.ColumnsInDisplayOrder[ColumnHeaderIndex(iCol)].Width; string PropName = FormatColumnWidthPropertyName(iCol); - m_propertyTable.SetProperty(PropName, nNewWidth, PropertyTable.SettingsGroup.LocalSettings, true); + m_propertyTable.SetProperty(PropName, nNewWidth, PropertyTable.SettingsGroup.LocalSettings, false); } } @@ -3080,7 +3080,7 @@ protected void UpdateColumnList() colList.Append(""); } colList.Append(""); - m_propertyTable.SetProperty(m_xbv.Vc.ColListId, colList.ToString(), PropertyTable.SettingsGroup.LocalSettings, true); + m_propertyTable.SetProperty(m_xbv.Vc.ColListId, colList.ToString(), PropertyTable.SettingsGroup.LocalSettings, false); } /// diff --git a/Src/Common/Controls/XMLViews/ReallySimpleListChooser.cs b/Src/Common/Controls/XMLViews/ReallySimpleListChooser.cs index 285d476e54..fc7ca5de21 100644 --- a/Src/Common/Controls/XMLViews/ReallySimpleListChooser.cs +++ b/Src/Common/Controls/XMLViews/ReallySimpleListChooser.cs @@ -2341,7 +2341,7 @@ private void Persist() { if (m_webBrowser != null) { - m_propertyTable.SetProperty("SimpleListChooser-HelpBrowserSplitterDistance", m_splitContainer.SplitterDistance, true); + m_propertyTable.SetProperty("SimpleListChooser-HelpBrowserSplitterDistance", m_splitContainer.SplitterDistance, false); m_persistProvider.PersistWindowSettings("SimpleListChooser-HelpBrowser", this); } else diff --git a/Src/Common/Controls/XMLViews/SearchEngine.cs b/Src/Common/Controls/XMLViews/SearchEngine.cs index d6d429b49e..4491badb3c 100644 --- a/Src/Common/Controls/XMLViews/SearchEngine.cs +++ b/Src/Common/Controls/XMLViews/SearchEngine.cs @@ -50,7 +50,7 @@ public static SearchEngine Get(Mediator mediator, PropertyTable propertyTable, s if (searchEngine == null) { searchEngine = searchEngineFactory(); - propertyTable.SetProperty(propName, searchEngine, true); + propertyTable.SetProperty(propName, searchEngine, false); propertyTable.SetPropertyDispose(propName, true); propertyTable.SetPropertyPersistence(propName, false); } diff --git a/Src/Common/Controls/XMLViews/XmlBrowseViewBaseVc.cs b/Src/Common/Controls/XMLViews/XmlBrowseViewBaseVc.cs index 70c3a8ea12..11459e9a12 100644 --- a/Src/Common/Controls/XMLViews/XmlBrowseViewBaseVc.cs +++ b/Src/Common/Controls/XMLViews/XmlBrowseViewBaseVc.cs @@ -332,7 +332,7 @@ internal static XmlDocument GetSavedColumns(string savedCols, Mediator mediator, goto case 19; case 19: savedCols = savedCols.Replace("root version=\"19\"", "root version=\"20\""); - propertyTable.SetProperty(colListId, savedCols, true); + propertyTable.SetProperty(colListId, savedCols, false); doc.LoadXml(savedCols); break; default: @@ -344,7 +344,7 @@ internal static XmlDocument GetSavedColumns(string savedCols, Mediator mediator, doc = null; // Forget the old settings, so we don't keep complaining every time the program runs. // There doesn't seem to be any way to remove the property altogether, so at least, make it empty. - propertyTable.SetProperty(colListId, "", PropertyTable.SettingsGroup.LocalSettings, true); + propertyTable.SetProperty(colListId, "", PropertyTable.SettingsGroup.LocalSettings, false); break; } } diff --git a/Src/Common/FieldWorks/FieldWorks.cs b/Src/Common/FieldWorks/FieldWorks.cs index 1947cc444c..8491d62679 100644 --- a/Src/Common/FieldWorks/FieldWorks.cs +++ b/Src/Common/FieldWorks/FieldWorks.cs @@ -1830,7 +1830,7 @@ private static ProjectId ShowWelcomeDialog(FwAppArgs args, FwApp startingApp, Pr var activeWindowInterface = (IFwMainWnd)activeWindow; activeWindowInterface.PropTable.SetProperty("LastBridgeUsed", obtainedProjectType == ObtainedProjectType.Lift ? "LiftBridge" : "FLExBridge", - PropertyTable.SettingsGroup.LocalSettings, true); + PropertyTable.SettingsGroup.LocalSettings, false); } } } @@ -1912,7 +1912,7 @@ internal static ProjectId ChooseLangProject(Form dialogOwner, IHelpTopicProvider activeWindowInterface.PropTable.SetProperty("LastBridgeUsed", dlg.ObtainedProjectType == ObtainedProjectType.Lift ? "LiftBridge" : "FLExBridge", PropertyTable.SettingsGroup.LocalSettings, - true); + false); } if (dlg.DialogResult == DialogResult.OK) diff --git a/Src/Common/FieldWorks/LexicalProvider/LexicalProviderImpl.cs b/Src/Common/FieldWorks/LexicalProvider/LexicalProviderImpl.cs index eba89e763a..9294c8d7fb 100644 --- a/Src/Common/FieldWorks/LexicalProvider/LexicalProviderImpl.cs +++ b/Src/Common/FieldWorks/LexicalProvider/LexicalProviderImpl.cs @@ -73,12 +73,12 @@ public void ShowEntry(string entry, EntryType entryType) using (Mediator mediator = new Mediator()) using (PropertyTable propertyTable = new PropertyTable(mediator)) { - propertyTable.SetProperty("HelpTopicProvider", FieldWorks.GetHelpTopicProvider(), true); + propertyTable.SetProperty("HelpTopicProvider", FieldWorks.GetHelpTopicProvider(), false); propertyTable.SetPropertyPersistence("HelpTopicProvider", false); var flexApp = FieldWorks.GetOrCreateFlexApp(); - propertyTable.SetProperty("FeedbackInfoProvider", flexApp, true); + propertyTable.SetProperty("FeedbackInfoProvider", flexApp, false); propertyTable.SetPropertyPersistence("FeedbackInfoProvider", false); - propertyTable.SetProperty("App", flexApp, true); + propertyTable.SetProperty("App", flexApp, false); LexEntryUi.DisplayEntry(FieldWorks.Cache, mediator, propertyTable, propertyTable.GetValue("HelpTopicProvider"), "UserHelpFile", tss, null); @@ -109,12 +109,12 @@ public void ShowRelatedWords(string entry, EntryType entryType) using (Mediator mediator = new Mediator()) using (PropertyTable propertyTable = new PropertyTable(mediator)) { - propertyTable.SetProperty("HelpTopicProvider", FieldWorks.GetHelpTopicProvider(), true); + propertyTable.SetProperty("HelpTopicProvider", FieldWorks.GetHelpTopicProvider(), false); propertyTable.SetPropertyPersistence("HelpTopicProvider", false); var flexApp = FieldWorks.GetOrCreateFlexApp(); - propertyTable.SetProperty("FeedbackInfoProvider", flexApp, true); + propertyTable.SetProperty("FeedbackInfoProvider", flexApp, false); propertyTable.SetPropertyPersistence("FeedbackInfoProvider", false); - propertyTable.SetProperty("App", flexApp, true); + propertyTable.SetProperty("App", flexApp, false); LexEntryUi.DisplayRelatedEntries(FieldWorks.Cache, mediator, propertyTable, propertyTable.GetValue("HelpTopicProvider"), "UserHelpFile", tss); diff --git a/Src/FdoUi/Dialogs/MergeObjectDlg.cs b/Src/FdoUi/Dialogs/MergeObjectDlg.cs index 6c79d8e12b..8c4d44d07d 100644 --- a/Src/FdoUi/Dialogs/MergeObjectDlg.cs +++ b/Src/FdoUi/Dialogs/MergeObjectDlg.cs @@ -403,8 +403,8 @@ private void MergeObjectDlg_Closed(object sender, EventArgs e) { if (m_propertyTable != null) { - m_propertyTable.SetProperty("mergeDlgLocation", Location, true); - m_propertyTable.SetProperty("mergeDlgSize", Size, true); + m_propertyTable.SetProperty("mergeDlgLocation", Location, false); + m_propertyTable.SetProperty("mergeDlgSize", Size, false); } } diff --git a/Src/FdoUi/LexEntryUi.cs b/Src/FdoUi/LexEntryUi.cs index 3ff1c4d328..13ac9f7c2e 100644 --- a/Src/FdoUi/LexEntryUi.cs +++ b/Src/FdoUi/LexEntryUi.cs @@ -310,7 +310,7 @@ private static IVwStylesheet GetStyleSheet(LcmCache cache, PropertyTable propert // (new) mediator. LcmStyleSheet styleSheet = new LcmStyleSheet(); styleSheet.Init(cache, cache.LanguageProject.Hvo, LangProjectTags.kflidStyles); - propertyTable.SetProperty("LcmStyleSheet", styleSheet, true); + propertyTable.SetProperty("LcmStyleSheet", styleSheet, false); propertyTable.SetPropertyPersistence("LcmStyleSheet", false); return styleSheet; } @@ -325,7 +325,7 @@ private static void EnsureWindowConfiguration(PropertyTable propertyTable) // files (true argument) but just trust that we put enough in the installer to make it work. XmlDocument configuration = XWindow.LoadConfigurationWithIncludes(configFile, true); XmlNode windowConfigurationNode = configuration.SelectSingleNode("window"); - propertyTable.SetProperty("WindowConfiguration", windowConfigurationNode, true); + propertyTable.SetProperty("WindowConfiguration", windowConfigurationNode, false); propertyTable.SetPropertyPersistence("WindowConfiguration", false); } } diff --git a/Src/FwCoreDlgs/FwFindReplaceDlg.cs b/Src/FwCoreDlgs/FwFindReplaceDlg.cs index c0f31b4f87..d7f448a804 100644 --- a/Src/FwCoreDlgs/FwFindReplaceDlg.cs +++ b/Src/FwCoreDlgs/FwFindReplaceDlg.cs @@ -1452,11 +1452,11 @@ protected override void OnClosing(CancelEventArgs e) if (m_mediator != null && m_propertyTable != null) { string propertyName = kPersistenceLabel + "DlgLocation"; - m_propertyTable.SetProperty(propertyName, Location, true); + m_propertyTable.SetProperty(propertyName, Location, false); propertyName = kPersistenceLabel + "ShowMore"; m_propertyTable.SetProperty(propertyName, Height == m_heightDlgMore ? "true" : "false", - true); + false); } base.OnClosing(e); // If no other handler of this event tried to intervene, the dialog itself will diff --git a/Src/LexText/Discourse/ConstituentChart.cs b/Src/LexText/Discourse/ConstituentChart.cs index 483fabc5c9..281af64234 100644 --- a/Src/LexText/Discourse/ConstituentChart.cs +++ b/Src/LexText/Discourse/ConstituentChart.cs @@ -137,7 +137,7 @@ internal void PersistAndDisplayChangedLineChoices() PropertyTable.SetProperty(ConfigPropName, m_ribbon.Vc.LineChoices.Persist(Cache.LanguageWritingSystemFactoryAccessor), PropertyTable.SettingsGroup.LocalSettings, - true); + false); UpdateDisplayForNewLineChoices(); } @@ -1211,7 +1211,7 @@ void PersistColumnWidths() } colList.Append(""); var cwId = ColWidthId(); - PropertyTable.SetProperty(cwId, colList.ToString(), true); + PropertyTable.SetProperty(cwId, colList.ToString(), false); } private string ColWidthId() diff --git a/Src/LexText/FlexPathwayPlugin/FlexPathwayPlugin.cs b/Src/LexText/FlexPathwayPlugin/FlexPathwayPlugin.cs index 73774f19ad..ffbc97b261 100644 --- a/Src/LexText/FlexPathwayPlugin/FlexPathwayPlugin.cs +++ b/Src/LexText/FlexPathwayPlugin/FlexPathwayPlugin.cs @@ -318,7 +318,7 @@ protected void ExportTool(string areaChoice, string toolChoice, string exportFor File.Delete(filePath); if (!ChangeAreaTool(areaChoice, toolChoice)) return; - exportDialog.PropTable.SetProperty("ExportDir", Path.GetDirectoryName(filePath), true); + exportDialog.PropTable.SetProperty("ExportDir", Path.GetDirectoryName(filePath), false); exportDialog.PropTable.SetPropertyPersistence("ExportDir", true); using (DeExportDialog ed = new DeExportDialog(exportDialog.Mediator, exportDialog.PropTable)) { diff --git a/Src/LexText/Interlinear/ComplexConcControl.cs b/Src/LexText/Interlinear/ComplexConcControl.cs index 52b54fee7a..281a671e96 100644 --- a/Src/LexText/Interlinear/ComplexConcControl.cs +++ b/Src/LexText/Interlinear/ComplexConcControl.cs @@ -101,7 +101,7 @@ public override void Init(Mediator mediator, PropertyTable propertyTable, XmlNod if (pattern == null) { pattern = new ComplexConcGroupNode(); - m_propertyTable.SetProperty("ComplexConcPattern", pattern, true); + m_propertyTable.SetProperty("ComplexConcPattern", pattern, false); m_propertyTable.SetPropertyPersistence("ComplexConcPattern", false); } m_patternModel = new ComplexConcPatternModel(m_cache, pattern); diff --git a/Src/LexText/Interlinear/FilterTextsDialog.cs b/Src/LexText/Interlinear/FilterTextsDialog.cs index c90b78b44f..35f2e78539 100644 --- a/Src/LexText/Interlinear/FilterTextsDialog.cs +++ b/Src/LexText/Interlinear/FilterTextsDialog.cs @@ -90,7 +90,7 @@ protected void OnOk(object obj, EventArgs e) if (own != null && OnlyGenresChecked(checkedList)) { message = ITextStrings.kOkbtnGenreSelection; - own.PropTable.SetProperty("RecordClerk-DelayedGenreAssignment", checkedList, true); + own.PropTable.SetProperty("RecordClerk-DelayedGenreAssignment", checkedList, false); showWarning = true; } if (m_treeTexts.GetNodesWithState(TriStateTreeView.CheckState.Checked).Length == 0) diff --git a/Src/LexText/Interlinear/InfoPane.cs b/Src/LexText/Interlinear/InfoPane.cs index befbcaeed3..eb23d3d84e 100644 --- a/Src/LexText/Interlinear/InfoPane.cs +++ b/Src/LexText/Interlinear/InfoPane.cs @@ -100,7 +100,7 @@ private void InitializeInfoView(RecordClerk clerk) var activeClerkNew = m_propertyTable.GetValue("ActiveClerk"); if (toolChoice != "interlinearEdit" && activeClerk != null && activeClerk != activeClerkNew) { - m_propertyTable.SetProperty("ActiveClerk", activeClerk, true); + m_propertyTable.SetProperty("ActiveClerk", activeClerk, false); activeClerk.ActivateUI(true); } } diff --git a/Src/LexText/Interlinear/InterlinDocForAnalysis.cs b/Src/LexText/Interlinear/InterlinDocForAnalysis.cs index ce98cc7787..b991363761 100644 --- a/Src/LexText/Interlinear/InterlinDocForAnalysis.cs +++ b/Src/LexText/Interlinear/InterlinDocForAnalysis.cs @@ -813,7 +813,7 @@ internal AnalysisOccurrence SelectedOccurrence ((InterlinDocForAnalysisVc)Vc).FocusBoxOccurrence = value; m_propertyTable.SetProperty("TextSelectedWord", value != null && value.HasWordform ? value.Analysis.Wordform : null, - true); + false); m_propertyTable.SetPropertyPersistence("TextSelectedWord", false); } } diff --git a/Src/LexText/Interlinear/InterlinDocRootSiteBase.cs b/Src/LexText/Interlinear/InterlinDocRootSiteBase.cs index 2bb99a9445..bf644a4f70 100644 --- a/Src/LexText/Interlinear/InterlinDocRootSiteBase.cs +++ b/Src/LexText/Interlinear/InterlinDocRootSiteBase.cs @@ -900,7 +900,7 @@ internal void PersistAndDisplayChangedLineChoices() m_propertyTable.SetProperty(ConfigPropName, Vc.LineChoices.Persist(m_cache.LanguageWritingSystemFactoryAccessor), PropertyTable.SettingsGroup.LocalSettings, - true); + false); UpdateDisplayForNewLineChoices(); } diff --git a/Src/LexText/Interlinear/RawTextPane.cs b/Src/LexText/Interlinear/RawTextPane.cs index 5ca65cc9b2..934232229d 100644 --- a/Src/LexText/Interlinear/RawTextPane.cs +++ b/Src/LexText/Interlinear/RawTextPane.cs @@ -485,7 +485,7 @@ protected override void HandleSelectionChange(IVwRootBox rootb, IVwSelection vws IWfiWordform wordform; if (!GetSelectedWordform(vwselNew, out wordform)) wordform = null; - m_propertyTable.SetProperty("TextSelectedWord", wordform, true); + m_propertyTable.SetProperty("TextSelectedWord", wordform, false); m_propertyTable.SetPropertyPersistence("TextSelectedWord", false); SelectionHelper helper = SelectionHelper.Create(vwselNew, this); diff --git a/Src/LexText/Interlinear/SandboxBase.designer.cs b/Src/LexText/Interlinear/SandboxBase.designer.cs index f4a604bf37..c9b07f2e59 100644 --- a/Src/LexText/Interlinear/SandboxBase.designer.cs +++ b/Src/LexText/Interlinear/SandboxBase.designer.cs @@ -30,7 +30,7 @@ protected override void Dispose(bool disposing) { if (m_propertyTable != null) { - m_propertyTable.SetProperty("FirstControlToHandleMessages", null, true); + m_propertyTable.SetProperty("FirstControlToHandleMessages", null, false); } } diff --git a/Src/LexText/LexTextControls/BaseGoDlg.cs b/Src/LexText/LexTextControls/BaseGoDlg.cs index 70fb7ebc66..db72ca8d31 100644 --- a/Src/LexText/LexTextControls/BaseGoDlg.cs +++ b/Src/LexText/LexTextControls/BaseGoDlg.cs @@ -836,10 +836,10 @@ private void BaseGoDlg_Closed(object sender, EventArgs e) if (m_mediator != null) { var propName = PersistenceLabel + "DlgLocation"; - m_propertyTable.SetProperty(propName, Location, true); + m_propertyTable.SetProperty(propName, Location, false); var sz = new Size(0, m_delta); propName = PersistenceLabel + "DlgSize"; - m_propertyTable.SetProperty(propName, Size - sz, true); + m_propertyTable.SetProperty(propName, Size - sz, false); } } diff --git a/Src/LexText/LexTextControls/CombineImportDlg.cs b/Src/LexText/LexTextControls/CombineImportDlg.cs index e9728fb82c..3826eda826 100644 --- a/Src/LexText/LexTextControls/CombineImportDlg.cs +++ b/Src/LexText/LexTextControls/CombineImportDlg.cs @@ -112,7 +112,7 @@ private void BrowseClicked(object sender, EventArgs e) UpdateButtons(); if (btnOK.Enabled) { - m_propertyTable.SetProperty(FilePropertyName, tbPath.Text, true); + m_propertyTable.SetProperty(FilePropertyName, tbPath.Text, false); m_propertyTable.SetPropertyPersistence(FilePropertyName, true); } } diff --git a/Src/LexText/LexTextControls/DataNotebook/NotebookImportWiz.cs b/Src/LexText/LexTextControls/DataNotebook/NotebookImportWiz.cs index 81bbf26932..4701318f52 100644 --- a/Src/LexText/LexTextControls/DataNotebook/NotebookImportWiz.cs +++ b/Src/LexText/LexTextControls/DataNotebook/NotebookImportWiz.cs @@ -1218,11 +1218,11 @@ private void btnSaveMapFile_Click(object sender, EventArgs e) private void SaveSettings() { - m_propertyTable.SetProperty("DataNotebookImportDb", m_tbDatabaseFileName.Text, true); + m_propertyTable.SetProperty("DataNotebookImportDb", m_tbDatabaseFileName.Text, false); m_propertyTable.SetPropertyPersistence("DataNotebookImportDb", true); - m_propertyTable.SetProperty("DataNotebookImportPrj", m_tbProjectFileName.Text, true); + m_propertyTable.SetProperty("DataNotebookImportPrj", m_tbProjectFileName.Text, false); m_propertyTable.SetPropertyPersistence("DataNotebookImportPrj", true); - m_propertyTable.SetProperty("DataNotebookImportMap", m_tbSaveAsFileName.Text, true); + m_propertyTable.SetProperty("DataNotebookImportMap", m_tbSaveAsFileName.Text, false); m_propertyTable.SetPropertyPersistence("DataNotebookImportMap", true); using (TextWriter tw = FileUtils.OpenFileForWrite(m_tbSaveAsFileName.Text, Encoding.UTF8)) { diff --git a/Src/LexText/LexTextControls/LiftImportDlg.cs b/Src/LexText/LexTextControls/LiftImportDlg.cs index 71377c2dd4..cfd61120c6 100644 --- a/Src/LexText/LexTextControls/LiftImportDlg.cs +++ b/Src/LexText/LexTextControls/LiftImportDlg.cs @@ -150,7 +150,7 @@ private void btnBrowse_Click(object sender, EventArgs e) UpdateButtons(); if (btnOK.Enabled) { - m_propertyTable.SetProperty(FilePropertyName, tbPath.Text, true); + m_propertyTable.SetProperty(FilePropertyName, tbPath.Text, false); m_propertyTable.SetPropertyPersistence(FilePropertyName, true); } } @@ -464,7 +464,7 @@ private void SetMergeStyle(FlexLiftMerger.MergeStyle ms) m_msImport = ms; m_propertyTable.SetProperty(MergeStylePropertyName, Enum.GetName(typeof(FlexLiftMerger.MergeStyle), m_msImport), - true); + false); m_propertyTable.SetPropertyPersistence(MergeStylePropertyName, true); } diff --git a/Src/LexText/LexTextControls/MasterCategoryListDlg.cs b/Src/LexText/LexTextControls/MasterCategoryListDlg.cs index 62a8be3d82..805884f47c 100644 --- a/Src/LexText/LexTextControls/MasterCategoryListDlg.cs +++ b/Src/LexText/LexTextControls/MasterCategoryListDlg.cs @@ -498,8 +498,8 @@ private void MasterCategoryListDlg_Closing(object sender, System.ComponentModel. if (m_mediator != null) { - m_propertyTable.SetProperty("masterCatListDlgLocation", Location, true); - m_propertyTable.SetProperty("masterCatListDlgSize", Size, true); + m_propertyTable.SetProperty("masterCatListDlgLocation", Location, false); + m_propertyTable.SetProperty("masterCatListDlgSize", Size, false); } } diff --git a/Src/LexText/LexTextControls/MasterListDlg.cs b/Src/LexText/LexTextControls/MasterListDlg.cs index fbd7ce0d8f..5ae6511248 100644 --- a/Src/LexText/LexTextControls/MasterListDlg.cs +++ b/Src/LexText/LexTextControls/MasterListDlg.cs @@ -517,8 +517,8 @@ private void MasterListDlg_Closing(object sender, System.ComponentModel.CancelEv if (m_propertyTable != null) { - m_propertyTable.SetProperty(m_sWindowKeyLocation, Location, true); - m_propertyTable.SetProperty(m_sWindowKeySize, Size, true); + m_propertyTable.SetProperty(m_sWindowKeyLocation, Location, false); + m_propertyTable.SetProperty(m_sWindowKeySize, Size, false); } } diff --git a/Src/LexText/LexTextControls/MsaCreatorDlg.cs b/Src/LexText/LexTextControls/MsaCreatorDlg.cs index 0ff426f4fa..421e3d192f 100644 --- a/Src/LexText/LexTextControls/MsaCreatorDlg.cs +++ b/Src/LexText/LexTextControls/MsaCreatorDlg.cs @@ -321,7 +321,7 @@ private void MsaCreatorDlg_Closed(object sender, System.EventArgs e) { if (m_propertyTable != null) { - m_propertyTable.SetProperty("msaCreatorDlgLocation", Location, true); + m_propertyTable.SetProperty("msaCreatorDlgLocation", Location, false); //No need, since the dlg isnt; resizable. m_mediator.XCore.PropertyTable.SetProperty("msaCreatorDlgSize", Size); } } diff --git a/Src/LexText/LexTextControls/MsaInflectionFeatureListDlg.cs b/Src/LexText/LexTextControls/MsaInflectionFeatureListDlg.cs index 10ac8f1256..6d35d3ef66 100644 --- a/Src/LexText/LexTextControls/MsaInflectionFeatureListDlg.cs +++ b/Src/LexText/LexTextControls/MsaInflectionFeatureListDlg.cs @@ -631,8 +631,8 @@ private void MsaInflectionFeatureListDlg_Closing(object sender, System.Component if (m_propertyTable != null) { - m_propertyTable.SetProperty("msaInflFeatListDlgLocation", Location, true); - m_propertyTable.SetProperty("msaInflFeatListDlgSize", Size, true); + m_propertyTable.SetProperty("msaInflFeatListDlgLocation", Location, false); + m_propertyTable.SetProperty("msaInflFeatListDlgSize", Size, false); } } diff --git a/Src/LexText/LexTextControls/PhonologicalFeatureChooserDlg.cs b/Src/LexText/LexTextControls/PhonologicalFeatureChooserDlg.cs index 11b622f682..7a835d5ea1 100644 --- a/Src/LexText/LexTextControls/PhonologicalFeatureChooserDlg.cs +++ b/Src/LexText/LexTextControls/PhonologicalFeatureChooserDlg.cs @@ -796,8 +796,8 @@ private void PhonologicalFeatureChooserDlg_Closing(object sender, System.Compone if (m_propertyTable != null) { - m_propertyTable.SetProperty("phonFeatListDlgLocation", Location, true); - m_propertyTable.SetProperty("phonFeatListDlgSize", Size, true); + m_propertyTable.SetProperty("phonFeatListDlgLocation", Location, false); + m_propertyTable.SetProperty("phonFeatListDlgSize", Size, false); } } diff --git a/Src/LexText/LexTextDll/AreaListener.cs b/Src/LexText/LexTextDll/AreaListener.cs index dd2de3e5da..d46f039d6e 100644 --- a/Src/LexText/LexTextDll/AreaListener.cs +++ b/Src/LexText/LexTextDll/AreaListener.cs @@ -195,7 +195,7 @@ public void OnPropertyChanged(string name) break;//this can happen when we use this property very early in the initialization //for next startup - m_propertyTable.SetProperty("InitialArea", areaName, true); + m_propertyTable.SetProperty("InitialArea", areaName, false); ActivateToolForArea(areaName); break; @@ -546,7 +546,7 @@ private static Guid GetOwnerlessListGuidFromToolNode(XmlNode toolNode) private void UpdateMediatorConfig(XmlNode windowConfig) { // We have to update this because other things besides 'tools' need to get set. - m_propertyTable.SetProperty("WindowConfiguration", windowConfig, true); + m_propertyTable.SetProperty("WindowConfiguration", windowConfig, false); m_propertyTable.SetPropertyPersistence("WindowConfiguration", false); } diff --git a/Src/LexText/Lexicon/FLExBridgeListener.cs b/Src/LexText/Lexicon/FLExBridgeListener.cs index 40d42022b0..9affba42c5 100644 --- a/Src/LexText/Lexicon/FLExBridgeListener.cs +++ b/Src/LexText/Lexicon/FLExBridgeListener.cs @@ -85,7 +85,7 @@ public void Init(Mediator mediator, PropertyTable propertyTable, XmlNode configu _mediator = mediator; _propertyTable = propertyTable; Cache = _propertyTable.GetValue("cache"); - _propertyTable.SetProperty("FLExBridgeListener", this, true); + _propertyTable.SetProperty("FLExBridgeListener", this, false); _propertyTable.SetPropertyPersistence("FLExBridgeListener", false); _parentForm = _propertyTable.GetValue
("window"); mediator.AddColleague(this); @@ -200,7 +200,7 @@ public bool OnObtainAnyFlexBridgeProject(object commandObject) if (string.IsNullOrEmpty(newprojectPathname)) return true; // We dealt with it. _propertyTable.SetProperty("LastBridgeUsed", obtainedProjectType == ObtainedProjectType.Lift ? "LiftBridge" : "FLExBridge", - PropertyTable.SettingsGroup.LocalSettings, true); + PropertyTable.SettingsGroup.LocalSettings, false); FieldWorks.OpenNewProject(new ProjectId(newprojectPathname)); @@ -250,7 +250,7 @@ public bool OnObtainLiftProject(object commandObject) } // Do merciful import. ImportLiftCommon(FlexLiftMerger.MergeStyle.MsKeepBoth); - _propertyTable.SetProperty("LastBridgeUsed", "LiftBridge", PropertyTable.SettingsGroup.LocalSettings, true); + _propertyTable.SetProperty("LastBridgeUsed", "LiftBridge", PropertyTable.SettingsGroup.LocalSettings, false); #pragma warning disable 618 // suppress obsolete warning _mediator.BroadcastMessage("MasterRefresh", null); #pragma warning restore 618 @@ -321,7 +321,7 @@ public bool OnFLExBridge(object commandObject) } StopParser(); SaveAllDataToDisk(); - _propertyTable.SetProperty("LastBridgeUsed", "FLExBridge", PropertyTable.SettingsGroup.LocalSettings, true); + _propertyTable.SetProperty("LastBridgeUsed", "FLExBridge", PropertyTable.SettingsGroup.LocalSettings, false); var projectFolder = Cache.ProjectId.ProjectFolder; var savedState = PrepareToDetectMainConflicts(projectFolder); @@ -460,7 +460,7 @@ public bool OnDisplayLiftBridge(object commandObject, ref UIItemDisplayPropertie public bool OnLiftBridge(object argument) { SaveAllDataToDisk(); - _propertyTable.SetProperty("LastBridgeUsed", "LiftBridge", PropertyTable.SettingsGroup.LocalSettings, true); + _propertyTable.SetProperty("LastBridgeUsed", "LiftBridge", PropertyTable.SettingsGroup.LocalSettings, false); // Step 0. Try to move an extant lift repo from old location to new. if (!MoveOldLiftRepoIfNeeded()) diff --git a/Src/LexText/Lexicon/ReversalListener.cs b/Src/LexText/Lexicon/ReversalListener.cs index 313a494204..20aa6977c5 100644 --- a/Src/LexText/Lexicon/ReversalListener.cs +++ b/Src/LexText/Lexicon/ReversalListener.cs @@ -447,7 +447,7 @@ public override void ChangeOwningObject(Guid newGuid, bool updateAndNotify, Dict OnChangeSorter(); // Update the column headers with sort arrows SyncReversalWritingSystem(ri); SetOwningObject(newOwningObj, updateAndNotify); // Reloads and sorts the list. - m_propertyTable.SetProperty("ActiveClerkOwningObject", newOwningObj, true); + m_propertyTable.SetProperty("ActiveClerkOwningObject", newOwningObj, false); m_propertyTable.SetPropertyPersistence("ActiveClerkOwningObject", false); Publisher.Publish(new PublisherParameterObject(EventConstants.ClerkOwningObjChanged, this, m_propertyTable.GetWindow())); } diff --git a/Src/LexText/Lexicon/SwapLexemeWithAllomorphDlg.cs b/Src/LexText/Lexicon/SwapLexemeWithAllomorphDlg.cs index e197ddf096..e74a62a185 100644 --- a/Src/LexText/Lexicon/SwapLexemeWithAllomorphDlg.cs +++ b/Src/LexText/Lexicon/SwapLexemeWithAllomorphDlg.cs @@ -321,7 +321,7 @@ private void SwapLexemeWithAllomorphDlg_Closed(object sender, EventArgs e) { if (m_propertyTable != null) { - m_propertyTable.SetProperty("swapDlgLocation", Location, true); + m_propertyTable.SetProperty("swapDlgLocation", Location, false); } } diff --git a/Src/LexText/Morphology/ConcordanceDlg.cs b/Src/LexText/Morphology/ConcordanceDlg.cs index f0358e9bdb..2fe4063557 100644 --- a/Src/LexText/Morphology/ConcordanceDlg.cs +++ b/Src/LexText/Morphology/ConcordanceDlg.cs @@ -296,7 +296,7 @@ public void Init(Mediator mediator, PropertyTable propertyTable, XmlNode configu helpProvider.SetShowHelp(this, true); - m_propertyTable.SetProperty("IgnoreStatusPanel", true, true); + m_propertyTable.SetProperty("IgnoreStatusPanel", true, false); m_propertyTable.SetPropertyPersistence("IgnoreStatusPanel", false); m_progAdvInd = new ProgressReporting(m_toolStripProgressBar); @@ -554,7 +554,7 @@ protected override void OnClosing(CancelEventArgs e) { if (!IsDisposed && m_propertyTable != null) { - m_propertyTable.SetProperty("IgnoreStatusPanel", false, true); + m_propertyTable.SetProperty("IgnoreStatusPanel", false, false); m_propertyTable.SetPropertyPersistence("IgnoreStatusPanel", false); } } diff --git a/Src/LexText/Morphology/MorphologyListener.cs b/Src/LexText/Morphology/MorphologyListener.cs index 3864ad18b3..b6a55d7bdb 100644 --- a/Src/LexText/Morphology/MorphologyListener.cs +++ b/Src/LexText/Morphology/MorphologyListener.cs @@ -265,7 +265,7 @@ public bool OnUseVernSpellingDictionary(object argument) OnEnableVernacularSpelling(); else WfiWordformServices.DisableVernacularSpellingDictionary(Cache); - m_propertyTable.SetProperty("UseVernSpellingDictionary", checking, true); + m_propertyTable.SetProperty("UseVernSpellingDictionary", checking, false); m_propertyTable.SetPropertyPersistence("UseVernSpellingDictionary", true); RestartSpellChecking(); return true; diff --git a/Src/LexText/Morphology/RespellerDlg.cs b/Src/LexText/Morphology/RespellerDlg.cs index ff89a8926b..30d6d97b58 100644 --- a/Src/LexText/Morphology/RespellerDlg.cs +++ b/Src/LexText/Morphology/RespellerDlg.cs @@ -592,7 +592,7 @@ private void m_btnApply_Click(object sender, EventArgs e) DestroyOldSelection(); // Clear PropertyTable of references to old hvo m_propertyTable.SetProperty("ActiveClerkSelectedObject", newWordform, true); - m_propertyTable.SetProperty("TextSelectedWord", newWordform, true); + m_propertyTable.SetProperty("TextSelectedWord", newWordform, false); m_propertyTable.SetPropertyPersistence("TextSelectedWord", false); } if (m_previewOn) diff --git a/Src/XCore/FlexUIAdapter/AdapterBase.cs b/Src/XCore/FlexUIAdapter/AdapterBase.cs index 8b7cb77dbf..b6101a9bbb 100644 --- a/Src/XCore/FlexUIAdapter/AdapterBase.cs +++ b/Src/XCore/FlexUIAdapter/AdapterBase.cs @@ -79,7 +79,7 @@ protected ToolStripManager Manager { manager = new ToolStripManager(); m_window.Controls.Add(manager); - m_propertyTable.SetProperty("ToolStripManager", manager, true); + m_propertyTable.SetProperty("ToolStripManager", manager, false); m_propertyTable.SetPropertyPersistence("ToolStripManager", false); } diff --git a/Src/XCore/FlexUIAdapter/ToolbarAdapter.cs b/Src/XCore/FlexUIAdapter/ToolbarAdapter.cs index 9022b502cb..048829e59e 100644 --- a/Src/XCore/FlexUIAdapter/ToolbarAdapter.cs +++ b/Src/XCore/FlexUIAdapter/ToolbarAdapter.cs @@ -176,7 +176,7 @@ protected void DepersistLayout() { } //remember now - m_propertyTable.SetProperty("PreviousToolbarVersion", currentVersion, true); + m_propertyTable.SetProperty("PreviousToolbarVersion", currentVersion, false); } /// diff --git a/Src/XCore/xCoreInterfaces/PersistenceProvider.cs b/Src/XCore/xCoreInterfaces/PersistenceProvider.cs index 9f56717dff..bb23f55fa8 100644 --- a/Src/XCore/xCoreInterfaces/PersistenceProvider.cs +++ b/Src/XCore/xCoreInterfaces/PersistenceProvider.cs @@ -91,7 +91,7 @@ protected object Get(string id,string label) protected void Set(string id,string label, object value) { var propertyName = GetPrefix(id) + "-" + label; - m_propertyTable.SetProperty(propertyName, value, true); + m_propertyTable.SetProperty(propertyName, value, false); } public void PersistWindowSettings(string id,Form form) diff --git a/Src/XCore/xWindow.cs b/Src/XCore/xWindow.cs index 6f26338579..0c5d5f662f 100644 --- a/Src/XCore/xWindow.cs +++ b/Src/XCore/xWindow.cs @@ -477,9 +477,9 @@ protected void LoadResources(XmlNode configurationNode) m_smallImages.AddList(configurationNode.SelectNodes("imageList[@size=null]")); //make image list available from the property table - PropTable.SetProperty("smallImages", m_smallImages, true); + PropTable.SetProperty("smallImages", m_smallImages, false); PropTable.SetPropertyPersistence("smallImages", false); - PropTable.SetProperty("largeImages", m_largeImages, true); + PropTable.SetProperty("largeImages", m_largeImages, false); PropTable.SetPropertyPersistence("largeImages", false); } @@ -685,7 +685,7 @@ protected virtual void LoadUIFromXmlDocument(XmlDocument configuration, string c m_windowConfigurationNode = configuration.SelectSingleNode("window"); - m_propertyTable.SetProperty("WindowConfiguration", m_windowConfigurationNode, true); + m_propertyTable.SetProperty("WindowConfiguration", m_windowConfigurationNode, false); m_propertyTable.SetPropertyPersistence("WindowConfiguration", false); SetApplicationName(); @@ -693,7 +693,7 @@ protected virtual void LoadUIFromXmlDocument(XmlDocument configuration, string c //nb:some things might be sensitive to when this actually happens LoadDefaultProperties(m_windowConfigurationNode.SelectSingleNode("defaultProperties")); - m_propertyTable.SetProperty("window", this, true); + m_propertyTable.SetProperty("window", this, false); m_propertyTable.SetPropertyPersistence("window", false); var st = StringTable.Table; // Makes ure it is loaded. LoadResources(m_windowConfigurationNode.SelectSingleNode("resources")); @@ -715,7 +715,7 @@ protected virtual void LoadUIFromXmlDocument(XmlDocument configuration, string c m_mediator.AddColleague(this); Assembly adaptorAssembly = GetAdapterAssembly(); - m_propertyTable.SetProperty("uiAdapter", adaptorAssembly, true); + m_propertyTable.SetProperty("uiAdapter", adaptorAssembly, false); m_propertyTable.SetPropertyPersistence("uiAdapter", false); //add the menubar @@ -856,7 +856,7 @@ private void SetApplicationName() { string applicationName = XmlUtils.GetAttributeValue(m_windowConfigurationNode, "label", "application name?"); ErrorReporter.AddProperty("Application", applicationName); - m_propertyTable.SetProperty("applicationName", applicationName, true); + m_propertyTable.SetProperty("applicationName", applicationName, false); m_propertyTable.SetPropertyPersistence("applicationName", false); UpdateCaptionBar(); } @@ -1042,7 +1042,7 @@ protected void CreateStatusBar(XmlNode windowConfigurationNode) { panel = new StatusBarPanel(); } - m_propertyTable.SetProperty(id, panel, true); + m_propertyTable.SetProperty(id, panel, false); m_propertyTable.SetPropertyPersistence(id, false); string val = XmlUtils.GetOptionalAttributeValue(part, "width"); @@ -2140,8 +2140,8 @@ protected void ChangeContentObjectIfPossible(string contentAssemblyPath, string private void SetToolDefaultProperties(XmlNode configurationNode) { - m_propertyTable.SetProperty("AllowInsertLinkToFile", true, true); // default to allowing LinkedFiles links - m_propertyTable.SetProperty("AllowShowNormalFields", true, true); + m_propertyTable.SetProperty("AllowInsertLinkToFile", true, false); // default to allowing LinkedFiles links + m_propertyTable.SetProperty("AllowShowNormalFields", true, false); if (configurationNode == null) return; @@ -2245,7 +2245,7 @@ private void XWindow_Resize(object sender, EventArgs e) // then switches to the normal state, we would be switching to a bizarre size. if (WindowState == FormWindowState.Normal) { - m_propertyTable.SetProperty("windowSize", Size, true); + m_propertyTable.SetProperty("windowSize", Size, false); } // We do need to store the window state as well: see LT-6602. // No broadcast even if it did change. @@ -2259,7 +2259,7 @@ private void XWindow_Move(object sender, EventArgs e) // then switches to the normal state, we would be switching to 0,0 or something. if (WindowState == FormWindowState.Normal) { - m_propertyTable.SetProperty("windowLocation", Location, true); + m_propertyTable.SetProperty("windowLocation", Location, false); } } diff --git a/Src/xWorks/ExportDialog.cs b/Src/xWorks/ExportDialog.cs index dfff9a5476..7c790c4726 100644 --- a/Src/xWorks/ExportDialog.cs +++ b/Src/xWorks/ExportDialog.cs @@ -608,7 +608,7 @@ private void btnExport_Click(object sender, EventArgs e) return; m_selectedTextsForAIExport = textDlg.SelectedTexts.ToList(); m_propertyTable.SetProperty("GrammarTextsAIExportSelection", - string.Join(",", m_selectedTextsForAIExport.Select(t => t.Guid.ToString())), true); + string.Join(",", m_selectedTextsForAIExport.Select(t => t.Guid.ToString())), false); m_propertyTable.SetPropertyPersistence("GrammarTextsAIExportSelection", true); } using (var dlg = new FolderBrowserDialogAdapter()) @@ -695,7 +695,7 @@ private void btnExport_Click(object sender, EventArgs e) } if (sDirectory != null) { - m_propertyTable.SetProperty("ExportDir", sDirectory, true); + m_propertyTable.SetProperty("ExportDir", sDirectory, false); m_propertyTable.SetPropertyPersistence("ExportDir", true); } if (fLiftExport) // Fixes LT-9437 Crash exporting a discourse chart (or interlinear too!) @@ -709,12 +709,12 @@ private void btnExport_Click(object sender, EventArgs e) if (m_chkShowInFolder.Checked) { OpenExportFolder(sDirectory, sFileName); - m_propertyTable.SetProperty("ExportDlgShowInFolder", "true", true); + m_propertyTable.SetProperty("ExportDlgShowInFolder", "true", false); m_propertyTable.SetPropertyPersistence("ExportDlgShowInFolder", true); } else { - m_propertyTable.SetProperty("ExportDlgShowInFolder", "false", true); + m_propertyTable.SetProperty("ExportDlgShowInFolder", "false", false); m_propertyTable.SetPropertyPersistence("ExportDlgShowInFolder", true); } } @@ -2045,7 +2045,7 @@ private void ExportPartOfSpeechFields(TextWriter w, IPartOfSpeech item) private void m_chkExportPictures_CheckedChanged(object sender, EventArgs e) { - m_propertyTable.SetProperty(ksLiftExportPicturesPropertyName, m_chkExportPictures.Checked, true); + m_propertyTable.SetProperty(ksLiftExportPicturesPropertyName, m_chkExportPictures.Checked, false); m_propertyTable.SetPropertyPersistence(ksLiftExportPicturesPropertyName, true); m_fExportPicturesAndMedia = m_chkExportPictures.Checked; } diff --git a/Src/xWorks/FwXWindow.cs b/Src/xWorks/FwXWindow.cs index 380a67e401..8a53f69127 100644 --- a/Src/xWorks/FwXWindow.cs +++ b/Src/xWorks/FwXWindow.cs @@ -297,11 +297,11 @@ private void BasicInit(FwApp app) { m_delegate.App = app; - m_propertyTable.SetProperty("HelpTopicProvider", app, true); + m_propertyTable.SetProperty("HelpTopicProvider", app, false); m_propertyTable.SetPropertyPersistence("HelpTopicProvider", false); - m_propertyTable.SetProperty("FeedbackInfoProvider", app, true); + m_propertyTable.SetProperty("FeedbackInfoProvider", app, false); m_propertyTable.SetPropertyPersistence("FeedbackInfoProvider", false); - m_propertyTable.SetProperty("App", app, true); + m_propertyTable.SetProperty("App", app, false); m_propertyTable.SetPropertyPersistence("App", false); } Subscriber.Subscribe(EventConstants.JumpToPopupLexEntry, JumpToPopupLexEntry, this); @@ -526,7 +526,7 @@ private void Init(Stream iconStream, Form wndCopyFrom, LcmCache cache) protected void InitMediatorValues(LcmCache cache) { m_propertyTable.LocalSettingsId = "local"; - m_propertyTable.SetProperty("cache", cache, true); + m_propertyTable.SetProperty("cache", cache, false); m_propertyTable.SetPropertyPersistence("cache", false); m_propertyTable.SetProperty("DocumentName", GetProjectName(cache), false); m_propertyTable.SetPropertyPersistence("DocumentName", false); diff --git a/Src/xWorks/GlobalSettingServices.cs b/Src/xWorks/GlobalSettingServices.cs index 5bee34507e..1978ad112e 100644 --- a/Src/xWorks/GlobalSettingServices.cs +++ b/Src/xWorks/GlobalSettingServices.cs @@ -23,7 +23,7 @@ public static class GlobalSettingServices public static void SaveSettings(ILcmServiceLocator services, PropertyTable propertyTable) { var hc = services.GetInstance(); - propertyTable.SetProperty(khomographconfiguration, hc.PersistData, true); + propertyTable.SetProperty(khomographconfiguration, hc.PersistData, false); } /// diff --git a/Src/xWorks/InterestingTextList.cs b/Src/xWorks/InterestingTextList.cs index ccfdb63393..a48b3a22d8 100644 --- a/Src/xWorks/InterestingTextList.cs +++ b/Src/xWorks/InterestingTextList.cs @@ -398,7 +398,7 @@ public void SetInterestingTexts(IEnumerable stTexts) private void UpdateExcludedCoreTexts(HashSet excludedGuids) { - m_propertyTable.SetProperty(ExcludeCoreTextPropertyName, MakeIdList(excludedGuids), true); + m_propertyTable.SetProperty(ExcludeCoreTextPropertyName, MakeIdList(excludedGuids), false); } private void UpdatePropertyTable() @@ -415,7 +415,7 @@ private void UpdatePropertyTable() /// public static void SetScriptureTextsInPropertyTable(Mediator mediator, PropertyTable propertyTable, IEnumerable texts) { - propertyTable.SetProperty(PersistPropertyName, MakeIdList(texts), true); + propertyTable.SetProperty(PersistPropertyName, MakeIdList(texts), false); } /// diff --git a/Src/xWorks/LinkListener.cs b/Src/xWorks/LinkListener.cs index 4e4a416c06..8547fe027c 100644 --- a/Src/xWorks/LinkListener.cs +++ b/Src/xWorks/LinkListener.cs @@ -192,7 +192,7 @@ public void Init(Mediator mediator, PropertyTable propertyTable, XmlNode configu m_mediator = mediator; m_propertyTable = propertyTable; mediator.AddColleague(this); - m_propertyTable.SetProperty("LinkListener", this, true); + m_propertyTable.SetProperty("LinkListener", this, false); m_propertyTable.SetPropertyPersistence("LinkListener", false); Subscriber.Subscribe(EventConstants.AddContextToHistory, AddContextToHistory, m_propertyTable.GetWindow()); @@ -552,7 +552,7 @@ private bool FollowActiveLink(bool suspendLoadingRecord) m_propertyTable.SetProperty("SuspendLoadingRecordUntilOnJumpToRecord", m_lnkActive.ToolName + "," + m_lnkActive.TargetGuid, PropertyTable.SettingsGroup.LocalSettings, - true); + false); m_propertyTable.SetPropertyPersistence("SuspendLoadingRecordUntilOnJumpToRecord", false); } Publisher.Publish(new PublisherParameterObject(EventConstants.SetToolFromName, m_lnkActive.ToolName, m_propertyTable.GetWindow())); @@ -595,7 +595,7 @@ private bool FollowActiveLink(bool suspendLoadingRecord) // Stop suspension of loading records. m_propertyTable.SetProperty("SuspendLoadingRecordUntilOnJumpToRecord", "", PropertyTable.SettingsGroup.LocalSettings, - true); + false); m_propertyTable.SetPropertyPersistence("SuspendLoadingRecordUntilOnJumpToRecord", false); if (m_lnkActive == null || m_lnkActive.DisplayErrorMsg) diff --git a/Src/xWorks/RecordBrowseView.cs b/Src/xWorks/RecordBrowseView.cs index 7ea5271d10..946ade1ef2 100644 --- a/Src/xWorks/RecordBrowseView.cs +++ b/Src/xWorks/RecordBrowseView.cs @@ -278,7 +278,7 @@ protected override void SetupDataContext() // to display an out-of-date list containing deleted objects, all kinds of things may go wrong. if (XmlUtils.GetOptionalBooleanAttributeValue(m_configurationParameters, "forceReloadListOnInitOrChangeRoot", false)) { - m_propertyTable.SetProperty(Clerk.Id + "_AlwaysRecomputeVirtualOnReloadList", true, true); + m_propertyTable.SetProperty(Clerk.Id + "_AlwaysRecomputeVirtualOnReloadList", true, false); // (EricP) when called by RecordView.InitBase() in the context of ListUpdateHelper.ClearBrowseListUntilReload // the list does not get reloaded until ListUpdateHelper is disposed, but the views property // will get cleared to prevent these views from accessing invalid objects. @@ -807,7 +807,7 @@ public virtual void OnCheckBoxChanged(object sender, CheckBoxChangedEventArgs e) private void m_browseViewer_SelectedIndexChanged(object sender, EventArgs e) { string propName = Clerk.PersistedIndexProperty; - m_propertyTable.SetProperty(propName, Clerk.CurrentIndex, PropertyTable.SettingsGroup.LocalSettings, true); + m_propertyTable.SetProperty(propName, Clerk.CurrentIndex, PropertyTable.SettingsGroup.LocalSettings, false); m_propertyTable.SetPropertyPersistence(propName, true, PropertyTable.SettingsGroup.LocalSettings); } diff --git a/Src/xWorks/RecordClerk.cs b/Src/xWorks/RecordClerk.cs index c6fdb99546..2e9f86e8e2 100644 --- a/Src/xWorks/RecordClerk.cs +++ b/Src/xWorks/RecordClerk.cs @@ -596,7 +596,7 @@ internal protected bool UpdateFiltersAndSortersIfNeeded(bool updateAndNotify, Di protected virtual void StoreClerkInPropertyTable(XmlNode clerkConfiguration) { string property = GetCorrespondingPropertyName(ToolConfiguration.GetIdOfTool(clerkConfiguration)); - m_propertyTable.SetProperty(property, this, true); + m_propertyTable.SetProperty(property, this, false); m_propertyTable.SetPropertyPersistence(property, false); m_propertyTable.SetPropertyDispose(property, true); } @@ -671,7 +671,7 @@ internal bool SuspendLoadListUntilOnChangeFilter { // reset this property. m_propertyTable.SetProperty("SuspendLoadListUntilOnChangeFilter", "", - PropertyTable.SettingsGroup.LocalSettings, true); + PropertyTable.SettingsGroup.LocalSettings, false); } } } @@ -699,7 +699,7 @@ public bool SuspendLoadingRecordUntilOnJumpToRecord // reset this property. m_propertyTable.SetProperty("SuspendLoadingRecordUntilOnJumpToRecord", "", PropertyTable.SettingsGroup.LocalSettings, - true); + false); m_propertyTable.SetPropertyPersistence("SuspendLoadingRecordUntilOnJumpToRecord", false); } @@ -1808,7 +1808,7 @@ public void SelectedRecordChanged(bool fSkipRecordNavigation, bool suppressFocus // save the selected record index. string propName = PersistedIndexProperty; - m_propertyTable.SetProperty(propName, CurrentIndex, PropertyTable.SettingsGroup.LocalSettings, true); + m_propertyTable.SetProperty(propName, CurrentIndex, PropertyTable.SettingsGroup.LocalSettings, false); m_propertyTable.SetPropertyPersistence(propName, true, PropertyTable.SettingsGroup.LocalSettings); if (IsControllingTheRecordTreeBar) @@ -2001,26 +2001,26 @@ virtual public bool IsControllingTheRecordTreeBar if (oldActiveClerk != this) { var oldUseRecordTreeBar = m_propertyTable.GetValue("UseRecordTreeBar"); - m_propertyTable.SetProperty("OldUseRecordTreeBar", oldUseRecordTreeBar, true); + m_propertyTable.SetProperty("OldUseRecordTreeBar", oldUseRecordTreeBar, false); m_propertyTable.SetPropertyPersistence("OldUseRecordTreeBar", false); - m_propertyTable.SetProperty("UseRecordTreeBar", m_useRecordTreeBar, true); + m_propertyTable.SetProperty("UseRecordTreeBar", m_useRecordTreeBar, false); m_propertyTable.SetPropertyPersistence("UseRecordTreeBar", false); var oldUpdateStatusBar = m_propertyTable.GetValue("UpdateStatusBar"); - m_propertyTable.SetProperty("OldUpdateStatusBar", oldUpdateStatusBar, true); + m_propertyTable.SetProperty("OldUpdateStatusBar", oldUpdateStatusBar, false); m_propertyTable.SetPropertyPersistence("OldUpdateStatusBar", false); - m_propertyTable.SetProperty("UpdateStatusBar", m_updateStatusBar, true); + m_propertyTable.SetProperty("UpdateStatusBar", m_updateStatusBar, false); m_propertyTable.SetPropertyPersistence("UpdateStatusBar", false); oldActiveClerk?.BecomeInactive(); - m_propertyTable.SetProperty("OldActiveClerk", oldActiveClerk, true); + m_propertyTable.SetProperty("OldActiveClerk", oldActiveClerk, false); m_propertyTable.SetPropertyPersistence("OldActiveClerk", false); m_propertyTable.SetProperty("ActiveClerk", this, true); m_propertyTable.SetPropertyPersistence("ActiveClerk", false); // We are adding this property so that EntryDlgListener can get access to the owning object // without first getting a RecordClerk, since getting a RecordClerk at that level causes a // circular dependency in compilation. - m_propertyTable.SetProperty("ActiveClerkOwningObject", OwningObject, true); + m_propertyTable.SetProperty("ActiveClerkOwningObject", OwningObject, false); m_propertyTable.SetPropertyPersistence("ActiveClerkOwningObject", false); m_propertyTable.SetProperty("ActiveClerkSelectedObject", CurrentObject, true); m_propertyTable.SetPropertyPersistence("ActiveClerkSelectedObject", false); @@ -2829,7 +2829,7 @@ public void OnChangeFilter(FilterChangeEventArgs args) m_list.OnChangeFilter(args); // Remember the active filter for this list. string persistFilter = DynamicLoader.PersistObject(Filter, "filter"); - m_propertyTable.SetProperty(GetFilterPropertyTableId(), persistFilter, PropertyTable.SettingsGroup.LocalSettings, true); + m_propertyTable.SetProperty(GetFilterPropertyTableId(), persistFilter, PropertyTable.SettingsGroup.LocalSettings, false); // adjust menu bar items according to current state of Filter, where needed. #pragma warning disable 618 // suppress obsolete warning m_mediator.BroadcastMessage("AdjustFilterSelection", Filter); @@ -3041,12 +3041,12 @@ public void OnSorterChanged(RecordSorter sorter, string sortName, bool isDefault m_isDefaultSort = isDefaultSort; SortName = sortName; - m_propertyTable.SetProperty(GetSortNamePropertyTableId(), SortName, PropertyTable.SettingsGroup.LocalSettings, true); + m_propertyTable.SetProperty(GetSortNamePropertyTableId(), SortName, PropertyTable.SettingsGroup.LocalSettings, false); m_list.ChangeSorter(sorter); // Remember how we're sorted. string persistSorter = DynamicLoader.PersistObject(Sorter, "sorter"); - m_propertyTable.SetProperty(GetSorterPropertyTableId(), persistSorter, PropertyTable.SettingsGroup.LocalSettings, true); + m_propertyTable.SetProperty(GetSorterPropertyTableId(), persistSorter, PropertyTable.SettingsGroup.LocalSettings, false); UpdateSortStatusBarPanel(); } diff --git a/Src/xWorks/RecordEditView.cs b/Src/xWorks/RecordEditView.cs index 1ef6f2fe11..04eacb3deb 100644 --- a/Src/xWorks/RecordEditView.cs +++ b/Src/xWorks/RecordEditView.cs @@ -199,7 +199,7 @@ public override bool OnRecordNavigation(object argument) // persist Clerk's CurrentIndex in a db specific way string propName = Clerk.PersistedIndexProperty; - m_propertyTable.SetProperty(propName, Clerk.CurrentIndex, PropertyTable.SettingsGroup.LocalSettings, true); + m_propertyTable.SetProperty(propName, Clerk.CurrentIndex, PropertyTable.SettingsGroup.LocalSettings, false); m_propertyTable.SetPropertyPersistence(propName, true, PropertyTable.SettingsGroup.LocalSettings); var window = m_propertyTable.GetValue("window"); diff --git a/Src/xWorks/RecordList.cs b/Src/xWorks/RecordList.cs index a302b76687..9c62e38cdc 100644 --- a/Src/xWorks/RecordList.cs +++ b/Src/xWorks/RecordList.cs @@ -1220,7 +1220,7 @@ private ISilDataAccessManaged GetDynamicListPublisher(XmlNode virtualListSpec) m_cache.MainCacheAccessor as ISilDataAccessManaged, virtualListSpec, m_cache.ServiceLocator); if (key != null) { - m_propertyTable.SetProperty(key, result, true); + m_propertyTable.SetProperty(key, result, false); m_propertyTable.SetPropertyPersistence(key, false); } } @@ -2712,7 +2712,7 @@ public virtual void ReloadList() CurrentIndex = -1; m_propertyTable.SetProperty(Clerk.PersistedIndexProperty, m_indexToRestoreDuringReload, PropertyTable.SettingsGroup.LocalSettings, - true); + false); m_indexToRestoreDuringReload = -1; } Clerk.UpdateHelper.ClearBrowseListUntilReload = false; diff --git a/Src/xWorks/TextListeners.cs b/Src/xWorks/TextListeners.cs index 767d8e2c21..b9791eddb2 100644 --- a/Src/xWorks/TextListeners.cs +++ b/Src/xWorks/TextListeners.cs @@ -296,7 +296,7 @@ public bool OnDisplayWritingSystemList(object parameter, ref UIListDisplayProper case WritingSystemSet.CurrentPronounciation: AddWritingSystemList(display, cache.ServiceLocator.WritingSystems.CurrentPronunciationWritingSystems); string sValue = DomainObjectServices.JoinIds(cache.ServiceLocator.WritingSystems.CurrentPronunciationWritingSystems.Select(ws => ws.Handle).ToArray(), ","); - m_propertyTable.SetProperty("PronunciationWritingSystemHvos", sValue, true); + m_propertyTable.SetProperty("PronunciationWritingSystemHvos", sValue, false); break; } return true;//we handled this, no need to ask anyone else. diff --git a/Src/xWorks/XhtmlDocView.cs b/Src/xWorks/XhtmlDocView.cs index a460ce9374..db86a52338 100644 --- a/Src/xWorks/XhtmlDocView.cs +++ b/Src/xWorks/XhtmlDocView.cs @@ -1313,7 +1313,7 @@ private void SetActiveSelectedEntryOnView(GeckoWebBrowser browser) { var newConfig = Path.Combine(DictionaryConfigurationListener.GetProjectConfigurationDirectory(m_propertyTable, semanticDomain), ClassifiedDictConfig); - m_propertyTable.SetProperty("SemanticDomainListLayout", File.Exists(newConfig) ? newConfig : null, true); + m_propertyTable.SetProperty("SemanticDomainListLayout", File.Exists(newConfig) ? newConfig : null, false); } else if (m_updateContentLater) { diff --git a/Src/xWorks/XmlDocConfigureDlg.cs b/Src/xWorks/XmlDocConfigureDlg.cs index 1f67cf747f..12d3055ed2 100644 --- a/Src/xWorks/XmlDocConfigureDlg.cs +++ b/Src/xWorks/XmlDocConfigureDlg.cs @@ -1198,7 +1198,7 @@ private void m_btnOK_Click(object sender, EventArgs e) m_propertyTable.SetProperty(m_sLayoutPropertyName, ((LayoutTypeComboItem)m_cbDictType.SelectedItem).LayoutName, XCore.PropertyTable.SettingsGroup.LocalSettings, - true); + false); m_propertyTable.SetPropertyPersistence(m_sLayoutPropertyName, true, XCore.PropertyTable.SettingsGroup.LocalSettings); SaveModifiedLayouts(); diff --git a/Src/xWorks/XmlDocView.cs b/Src/xWorks/XmlDocView.cs index ab54a10d8b..9ef9829522 100644 --- a/Src/xWorks/XmlDocView.cs +++ b/Src/xWorks/XmlDocView.cs @@ -143,7 +143,7 @@ public virtual bool OnRecordNavigation(object argument) // persist Clerk's CurrentIndex in a db specific way string propName = Clerk.PersistedIndexProperty; - m_propertyTable.SetProperty(propName, Clerk.CurrentIndex, PropertyTable.SettingsGroup.LocalSettings, true); + m_propertyTable.SetProperty(propName, Clerk.CurrentIndex, PropertyTable.SettingsGroup.LocalSettings, false); m_propertyTable.SetPropertyPersistence(propName, true, PropertyTable.SettingsGroup.LocalSettings); Clerk.SuppressSaveOnChangeRecord = (argument as RecordNavigationInfo).SuppressSaveOnChangeRecord; From 92d6bcf79dcaa6faf884a69c7377d4ccc2090ca0 Mon Sep 17 00:00:00 2001 From: mark-sil <83427558+mark-sil@users.noreply.github.com> Date: Fri, 9 Oct 2026 07:40:38 -0400 Subject: [PATCH 2/2] Remove OnPropertyChanged branches that nothing broadcasts Two OnPropertyChanged overrides wait for property names that no production code ever sets with the broadcast flag. XmlBrowseView reacted to "_readOnlyBrowse" by refreshing the selected-row highlighting. Nothing sets such a property, and XmlBrowseViewBase already treats the "_readOnlyBrowse" properties as deprecated, deciding read-only selection from the "editable" attribute. XmlSeqView reacted to "ShowFailingItems-" by rebuilding its root box. The only such property is the pane-bar button ShowFailingItems-lexiconClassifiedDictionary, and that tool's view is an XhtmlDocView with its own handler. XmlSeqView is hosted only by XmlDocView in the Notebook Document tool, which has no such button. The field that reads the property once in MakeRoot stays. Both overrides otherwise only called the base handler, so they go entirely, with the two tests that drove the XmlSeqView branch directly and the test helper only they used. Co-Authored-By: Claude Fable 5.1 --- .../XmlViewRefreshPolicyTests.cs | 42 ------------------- Src/Common/Controls/XMLViews/XmlBrowseView.cs | 14 ------- Src/Common/Controls/XMLViews/XmlSeqView.cs | 39 +---------------- 3 files changed, 2 insertions(+), 93 deletions(-) diff --git a/Src/Common/Controls/XMLViews/XMLViewsTests/XmlViewRefreshPolicyTests.cs b/Src/Common/Controls/XMLViews/XMLViewsTests/XmlViewRefreshPolicyTests.cs index 76eee9143a..60ddbd8de0 100644 --- a/Src/Common/Controls/XMLViews/XMLViewsTests/XmlViewRefreshPolicyTests.cs +++ b/Src/Common/Controls/XMLViews/XMLViewsTests/XmlViewRefreshPolicyTests.cs @@ -5,7 +5,6 @@ using NUnit.Framework; using SIL.FieldWorks.Common.ViewsInterfaces; using SIL.LCModel; -using SIL.LCModel.Core.KernelInterfaces; using XCore; namespace XMLViewsTests @@ -37,10 +36,6 @@ public void InstallXmlVcForTest(SIL.FieldWorks.Common.Controls.XmlVc xmlVc) m_xmlVc = xmlVc; } - public void InstallPropertyTableForTest(PropertyTable propertyTable) - { - m_propertyTable = propertyTable; - } } [TestFixture] @@ -144,42 +139,5 @@ public void XmlSeqViewResetRoot_ReassignsRootObjectAndReconstructs() } } - [Test] - public void XmlSeqViewOnPropertyChanged_ShowFailingItemsChange_ReconstructsRootBox() - { - using (var view = new TestXmlSeqView()) - using (var propertyTable = new PropertyTable(null)) - { - var rootBox = new FakeXmlBrowseViewBase.FakeRootBox(); - view.InstallRootBoxForTest(rootBox); - view.InstallXmlVcForTest(new SIL.FieldWorks.Common.Controls.XmlVc("root", false, view, null, (ISilDataAccess)null)); - view.InstallPropertyTableForTest(propertyTable); - propertyTable.SetProperty("currentContentControl", "tool", false); - propertyTable.SetProperty("ShowFailingItems-tool", true, false); - - view.OnPropertyChanged("ShowFailingItems-tool"); - - Assert.That(rootBox.ReconstructCallCount, Is.EqualTo(1)); - } - } - - [Test] - public void XmlSeqViewOnPropertyChanged_ShowFailingItemsUnchanged_DoesNotReconstructRootBox() - { - using (var view = new TestXmlSeqView()) - using (var propertyTable = new PropertyTable(null)) - { - var rootBox = new FakeXmlBrowseViewBase.FakeRootBox(); - view.InstallRootBoxForTest(rootBox); - view.InstallXmlVcForTest(new SIL.FieldWorks.Common.Controls.XmlVc("root", false, view, null, (ISilDataAccess)null)); - view.InstallPropertyTableForTest(propertyTable); - propertyTable.SetProperty("currentContentControl", "tool", false); - propertyTable.SetProperty("ShowFailingItems-tool", false, false); - - view.OnPropertyChanged("ShowFailingItems-tool"); - - Assert.That(rootBox.ReconstructCallCount, Is.EqualTo(0)); - } - } } } \ No newline at end of file diff --git a/Src/Common/Controls/XMLViews/XmlBrowseView.cs b/Src/Common/Controls/XMLViews/XmlBrowseView.cs index f10709fc39..6c5c7fb131 100644 --- a/Src/Common/Controls/XMLViews/XmlBrowseView.cs +++ b/Src/Common/Controls/XMLViews/XmlBrowseView.cs @@ -65,20 +65,6 @@ public override XmlBrowseViewBaseVc Vc } } - /// - /// This is invoked by the PropertyTable (because XmlBrowseView is a mediator). - /// - /// - public override void OnPropertyChanged(string propName) - { - CheckDisposed(); - - if (propName == GetCorrespondingPropertyName("readOnlyBrowse")) - SetSelectedRowHighlighting(); - - base.OnPropertyChanged(propName); - } - private ITsString StripTrailingNewLine(ITsString tss) { string val = tss.Text; diff --git a/Src/Common/Controls/XMLViews/XmlSeqView.cs b/Src/Common/Controls/XMLViews/XmlSeqView.cs index 456847cec6..9999768f24 100644 --- a/Src/Common/Controls/XMLViews/XmlSeqView.cs +++ b/Src/Common/Controls/XMLViews/XmlSeqView.cs @@ -131,7 +131,6 @@ public class XmlSeqView : RootSite protected XmlVc m_xmlVc; /// protected IFwMetaDataCache m_mdc; - bool m_fShowFailingItems; // display items that fail the condition specified in the view. private IApp m_app; /// @@ -316,7 +315,7 @@ public override void MakeRoot() bool fEditable = XmlUtils.GetOptionalBooleanAttributeValue(m_xnSpec, "editable", true); string toolName = m_propertyTable.GetStringProperty("currentContentControl", null); - m_fShowFailingItems = m_propertyTable.GetBoolProperty("ShowFailingItems-" + toolName, false); + bool fShowFailingItems = m_propertyTable.GetBoolProperty("ShowFailingItems-" + toolName, false); //m_xmlVc = new XmlVc(m_xnSpec, Table); // possibly reinstate for old approach? // Note: we want to keep this logic similar to RecordDocView.GetLayoutName(), except that here // we do NOT want to use the layoutSuffix, though it may be specified so that it can be @@ -329,7 +328,7 @@ public override void MakeRoot() sLayout = XmlUtils.GetMandatoryAttributeValue(m_xnSpec, "layout"); ISilDataAccess sda = GetSda(); m_xmlVc = new XmlVc(sLayout, fEditable, this, m_app, - m_fShowFailingItems ? null : ItemDisplayCondition, sda) {IdentifySource = true}; + fShowFailingItems ? null : ItemDisplayCondition, sda) {IdentifySource = true}; ReadOnlyView = !fEditable; if (!fEditable) m_rootb.MaxParasToScan = 0; @@ -358,40 +357,6 @@ private XmlNode ItemDisplayCondition get { return m_xnSpec.SelectSingleNode("elementDisplayCondition"); } } - /// - /// Receives the broadcast message "PropertyChanged" - /// - public override void OnPropertyChanged(string name) - { - CheckDisposed(); - - base.OnPropertyChanged(name); - string toolName = m_propertyTable.GetStringProperty("currentContentControl", null); - if(name == "ShowFailingItems-" + toolName) - { - bool fShowFailingItems = m_propertyTable.GetBoolProperty(name, false); - if (fShowFailingItems != m_fShowFailingItems) - { - m_fShowFailingItems = fShowFailingItems; - m_xmlVc.MakeRootCommand(this, m_fShowFailingItems ? null : ItemDisplayCondition); - try - { - EditingHelper.DefaultCursor = Cursors.WaitCursor; - using (new WaitCursor(TopLevelControl)) - { - m_rootb.Reconstruct(); - Invalidate(); - Update(); // most of the time is the painting, we want the watch cursor till it's done. - } - } - finally - { - EditingHelper.DefaultCursor = null; - } - } - } - } - /// ----------------------------------------------------------------------------------- /// /// Notifies the site that something about the selection has changed.