CSSTUDIO-1950 Remove calls to fireItemDataConfigChanged() when archivers are removed from instances of PVItem.
#2730
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This merge-request removes calls to
fireItemDataConfigChanged()when archivers are removed from instances ofPVItem.I am not sure this fix is a "correct" fix or not, and therefore I would like to ask about your opinion on this.
The intention with the merge-request is to fix an issue that occurs when some configured archivers don't archive a specific PV: if a Data Browser configuration is loaded that contains a PV that some archivers don't archive, then those archivers will automatically be removed from the
PVIteminstance associated with the PV in question by callingremoveArchiveDataSource(). The functionremoveArchiveDataSource(), in turn, calls the functionfireDataItemChanged(), which, in turn, (at least when I reproduce the issue) calls 7 different instances ofModelListeners.changedItemDataConfig(). One of the invoked instances isDataBrowserInstance.changedItemDataConfig(), which, in turn, callssetDirty(true).The result is that about 1 second or so after loading the Data Browser configuration, the dirty mark is set even though no change in the Data Browser configuration has occurred.
By removing the call to fireItemDataConfigChanged() in removeArchiveDataSource(), the dirty mark is not set and the issue doesn't occur. However, a consequence is that the 6 instances of
ModelListeners.changedItemDataConfig()other thanDataBrowserInstance.changedItemDataConfig()are also not invoked. When I reproduce the issue, the instances in question are:TracesTab.changedItemDataConfig()TimeAxisTab.changedItemDataConfig()AxesTab.changedItemDataConfig()MiscTab.changedItemDataConfig()StatisticsTabController.changedItemDataConfig()Controller.changedItemDataConfig()Do these functions need to be invoked when an archiver is removed from a PV?