Skip to content

Commit 147815d

Browse files
authored
Merge pull request #2730 from ControlSystemStudio/CSSTUDIO-1950
CSSTUDIO-1950 Remove calls to `fireItemDataConfigChanged()` when archivers are removed from instances of `PVItem`.
2 parents f6ace83 + 65b745a commit 147815d

File tree

1 file changed

+5
-3
lines changed
  • app/databrowser/src/main/java/org/csstudio/trends/databrowser3/model

1 file changed

+5
-3
lines changed

app/databrowser/src/main/java/org/csstudio/trends/databrowser3/model/PVItem.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -242,9 +242,11 @@ public void addArchiveDataSource(final ArchiveDataSource archs[])
242242
/** @param archive Archive to remove as a source from this item. */
243243
public void removeArchiveDataSource(final ArchiveDataSource archive)
244244
{
245-
// Archive removed -> (Probably) no need to get new data
246-
if (archives.remove(archive))
245+
boolean change = archives.remove(archive);
246+
if (!Preferences.use_default_archives && change) {
247+
// Archive removed -> (Probably) no need to get new data
247248
fireItemDataConfigChanged(false);
249+
}
248250
}
249251

250252
/** @param archs Archives to remove as a source from this item. Ignored when not used. */
@@ -254,7 +256,7 @@ public void removeArchiveDataSource(final List<ArchiveDataSource> archs)
254256
for (ArchiveDataSource archive : archs)
255257
if (archives.remove(archive))
256258
change = true;
257-
if (change)
259+
if (!Preferences.use_default_archives && change)
258260
fireItemDataConfigChanged(false);
259261
}
260262

0 commit comments

Comments
 (0)