Palette browser - fix bug when dragging several blocks
[scilab.git] / scilab / modules / xcos / src / java / org / scilab / modules / xcos / palette / listener / PaletteDragGestureListener.java
index e519445..3c65a6c 100644 (file)
@@ -49,6 +49,10 @@ public final class PaletteDragGestureListener implements DragGestureListener {
         if (paletteCtrl == null) {
             return;
         }
+
+        if (!blockCtrl.isSelected()) {
+            PaletteCtrl.clearSelections();
+        }
         blockCtrl.setSelected(true);
 
         if (PaletteManagerView.get() == null) {