From 2f626e0a901a9c92bb6bb6038b4062fc29ca1cac Mon Sep 17 00:00:00 2001 From: Gatsby Date: Tue, 17 Dec 2024 03:26:59 +0800 Subject: [PATCH 1/2] fixed #615 KO toggle button state runs incorrectly in tile mode --- .../main/java/org/weasis/dicom/viewer2d/View2dContainer.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/weasis-dicom/weasis-dicom-viewer2d/src/main/java/org/weasis/dicom/viewer2d/View2dContainer.java b/weasis-dicom/weasis-dicom-viewer2d/src/main/java/org/weasis/dicom/viewer2d/View2dContainer.java index 94b327990..8b2145c73 100755 --- a/weasis-dicom/weasis-dicom-viewer2d/src/main/java/org/weasis/dicom/viewer2d/View2dContainer.java +++ b/weasis-dicom/weasis-dicom-viewer2d/src/main/java/org/weasis/dicom/viewer2d/View2dContainer.java @@ -687,6 +687,11 @@ private void setKOSpecialElement( if (updateAll) { List> viewList = getImagePanels(true); for (ViewCanvas view : viewList) { + if (forceUpdate + || updatedKOSelection == view.getActionValue(ActionW.KO_SELECTION.cmd())) { + KOManager.updateKOFilter( + view, forceUpdate ? updatedKOSelection : null, enableFilter, -1); + } ((View2d) view).updateKOButtonVisibleState(); } } else { From d9794665280b47cb9ba1e6ff18fe80691d295b9f Mon Sep 17 00:00:00 2001 From: Civin Date: Tue, 17 Dec 2024 13:05:35 +0000 Subject: [PATCH 2/2] fixed KO toggle button state runs incorrectly in tile mode #615 --- .../org/weasis/dicom/viewer2d/KeyObjectToolBar.java | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/weasis-dicom/weasis-dicom-viewer2d/src/main/java/org/weasis/dicom/viewer2d/KeyObjectToolBar.java b/weasis-dicom/weasis-dicom-viewer2d/src/main/java/org/weasis/dicom/viewer2d/KeyObjectToolBar.java index 4edabf6c1..27b54e9a7 100755 --- a/weasis-dicom/weasis-dicom-viewer2d/src/main/java/org/weasis/dicom/viewer2d/KeyObjectToolBar.java +++ b/weasis-dicom/weasis-dicom-viewer2d/src/main/java/org/weasis/dicom/viewer2d/KeyObjectToolBar.java @@ -230,11 +230,13 @@ private void editKo( DicomModel dicomModel = (DicomModel) selectedDicomSeries.getTagValue(TagW.ExplorerModel); if (dicomModel != null) { dicomModel.removeHiddenSpecialElement(list.getSelectedValue()); - if (selectedView2d instanceof View2d view2d) { - boolean needToRepaint = view2d.updateKOSelectedState(selectedView2d.getImage()); - if (needToRepaint) { - evtMgr.updateKeyObjectComponentsListener(selectedView2d); - repaint(); + for (ViewCanvas canvas : selectedView2dContainer.getView2ds()) { + if (canvas instanceof View2d view2d) { + boolean needToRepaint = view2d.updateKOSelectedState(view2d.getImage()); + if (needToRepaint && view2d==selectedView2d) { + evtMgr.updateKeyObjectComponentsListener(selectedView2d); + repaint(); + } } } }