@@ -150,7 +150,7 @@ public enum Orientation {
150150 private boolean explicitHeaderRow = true ;
151151
152152 private String layoutId ;
153-
153+
154154 private static <T > ListDataProvider <T > emptyDataProvider () {
155155 return DataProvider .ofCollection (new LinkedHashSet <>());
156156 }
@@ -339,7 +339,7 @@ private String getLayoutId() {
339339 return this .layoutId = "twincol-" + UUID .randomUUID ();
340340 });
341341 }
342-
342+
343343 private HorizontalLayout createHorizontalContainer (boolean reverse ) {
344344 buttonContainer = getVerticalButtonContainer ();
345345 HorizontalLayout hl ;
@@ -928,12 +928,14 @@ public void setMoveItemsByDoubleClick(boolean value) {
928928 side .moveItemsByDoubleClick =
929929 side .grid .addItemDoubleClickListener (
930930 ev -> {
931- Set <T > item = Collections .singleton (ev .getItem ());
932- if (side == available ) {
933- updateSelection (item , Collections .emptySet (), true );
934- }
935- if (side == selection ) {
936- updateSelection (Collections .emptySet (), item , true );
931+ if (!isReadOnly ()) {
932+ Set <T > item = Collections .singleton (ev .getItem ());
933+ if (side == available ) {
934+ updateSelection (item , Collections .emptySet (), true );
935+ }
936+ if (side == selection ) {
937+ updateSelection (Collections .emptySet (), item , true );
938+ }
937939 }
938940 });
939941 }
0 commit comments