Skip to content

Commit

Permalink
Merge pull request nroduit#617 from a347807131/issues/615
Browse files Browse the repository at this point in the history
fixed nroduit#615 KO toggle button state runs incorrectly in tile mode
  • Loading branch information
nroduit authored Dec 26, 2024
2 parents fb06141 + d979466 commit e358917
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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<DicomImageElement> canvas : selectedView2dContainer.getView2ds()) {
if (canvas instanceof View2d view2d) {
boolean needToRepaint = view2d.updateKOSelectedState(view2d.getImage());
if (needToRepaint && view2d==selectedView2d) {
evtMgr.updateKeyObjectComponentsListener(selectedView2d);
repaint();
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -687,6 +687,11 @@ private void setKOSpecialElement(
if (updateAll) {
List<ViewCanvas<DicomImageElement>> viewList = getImagePanels(true);
for (ViewCanvas<DicomImageElement> view : viewList) {
if (forceUpdate
|| updatedKOSelection == view.getActionValue(ActionW.KO_SELECTION.cmd())) {
KOManager.updateKOFilter(
view, forceUpdate ? updatedKOSelection : null, enableFilter, -1);
}
((View2d) view).updateKOButtonVisibleState();
}
} else {
Expand Down

0 comments on commit e358917

Please sign in to comment.