@ -166,7 +166,7 @@ public class EditingMouseListener extends MouseInputAdapter {
// 获取焦点,以便获取热键
// 获取焦点,以便获取热键
designer . requestFocus ( ) ;
designer . requestFocus ( ) ;
}
}
if ( e . getButton ( ) = = MouseEvent . BUTTON1 ) {
if ( e . getButton ( ) = = MouseEvent . BUTTON1 & & e . getX ( ) > 0 & & e . getY ( ) > 0 ) {
Direction dir = selectionModel . getDirectionAt ( e ) ;
Direction dir = selectionModel . getDirectionAt ( e ) ;
if ( ! DesignerMode . isAuthorityEditing ( ) ) {
if ( ! DesignerMode . isAuthorityEditing ( ) ) {
@ -177,13 +177,10 @@ public class EditingMouseListener extends MouseInputAdapter {
if ( designer . isDrawLineMode ( ) ) {
if ( designer . isDrawLineMode ( ) ) {
designer . updateDrawLineMode ( e ) ;
designer . updateDrawLineMode ( e ) ;
} else {
} else {
int relativeX = Math . max ( 0 , e . getX ( ) ) ;
int relativeY = Math . max ( 0 , e . getY ( ) ) ;
if ( selectionModel . hasSelectionComponent ( )
if ( selectionModel . hasSelectionComponent ( )
& & selectionModel . getSelection ( ) . getRelativeBounds ( ) . contains (
& & selectionModel . getSelection ( ) . getRelativeBounds ( ) . contains (
designer . getHorizontalScaleValue ( ) + relativeX ,
designer . getHorizontalScaleValue ( ) + e . getX ( ) ,
designer . getVerticalScaleValue ( ) + relativeY ) ) {
designer . getVerticalScaleValue ( ) + e . getY ( ) ) ) {
lastPressEvent = e ;
lastPressEvent = e ;
lastXCreator = selectionModel . getSelection ( ) . getSelectedCreator ( ) ;
lastXCreator = selectionModel . getSelection ( ) . getSelectedCreator ( ) ;
} else {
} else {