|
|
|
@ -30,6 +30,7 @@ import com.fr.design.utils.ComponentUtils;
|
|
|
|
|
import com.fr.design.utils.gui.LayoutUtils; |
|
|
|
|
import com.fr.general.ComparatorUtils; |
|
|
|
|
import com.fr.stable.ArrayUtils; |
|
|
|
|
import com.fr.stable.StringUtils; |
|
|
|
|
|
|
|
|
|
import java.awt.LayoutManager; |
|
|
|
|
import java.awt.Rectangle; |
|
|
|
@ -83,7 +84,9 @@ public class SelectionModel {
|
|
|
|
|
XCreator comp = designer.getComponentAt(e); |
|
|
|
|
if (e.getButton() == MouseEvent.BUTTON3 || (!InputEventBaseOnOS.isControlDown(e) && !e.isShiftDown())) { |
|
|
|
|
// 如果Ctrl或者Shift键盘没有按下,则清除已经选择的组件
|
|
|
|
|
if (!StringUtils.equals(selection.getSelectedCreator().toData().getWidgetName(), comp.toData().getWidgetName())) { |
|
|
|
|
selection.reset(); |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
//按下Ctrl或者shift键时鼠标可以进行多选,两次点击同一控件就取消选中
|
|
|
|
|
XLayoutContainer topLayout = XCreatorUtils.getHotspotContainer(comp).getTopLayout(); |
|
|
|
|