Issue #2360 don't allow mouse actions on layer if layer is invisible
Change-Id: Id8e169d4af96902e72b2509d2f53e39ac6cc0a8a Former-commit-id:906e9ad7e9
[formerly08bd2c0241
] [formerlyce457b5be4
[formerly e4e6f46be381f83c7273d84e62d274575048aac2]] Former-commit-id:ce457b5be4
Former-commit-id:11c1fa94ae
This commit is contained in:
parent
4cf8b94622
commit
450f5d063d
2 changed files with 14 additions and 7 deletions
|
@ -79,6 +79,7 @@ import com.vividsolutions.jts.geom.Coordinate;
|
|||
* not allow the legend to change.
|
||||
* 07-21-2010 bkowal We will now display the standard SWT "hand"
|
||||
* Mar 21, 2013 1638 mschenke Changed to use generic tool data
|
||||
* Sep 18, 2013 #2360 njensen Ignore mouse actions if layer is invisible
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -293,7 +294,7 @@ public abstract class AbstractMovableToolLayer<T> extends
|
|||
}
|
||||
|
||||
public boolean handleMouseDown(int x, int y, int mouseButton) {
|
||||
if ((liveObject == null) && isEditable()) {
|
||||
if ((liveObject == null) && isEditable() && getProperties().isVisible()) {
|
||||
IDisplayPaneContainer container = getResourceContainer();
|
||||
lastMouseLoc = container.translateClick(x, y);
|
||||
|
||||
|
@ -351,7 +352,8 @@ public abstract class AbstractMovableToolLayer<T> extends
|
|||
issueRefresh();
|
||||
}
|
||||
return true;
|
||||
} else if ((liveObject == null) && isEditable()) {
|
||||
} else if ((liveObject == null) && isEditable()
|
||||
&& getProperties().isVisible()) {
|
||||
if (objects == null) {
|
||||
return false;
|
||||
}
|
||||
|
@ -394,7 +396,7 @@ public abstract class AbstractMovableToolLayer<T> extends
|
|||
|
||||
@SuppressWarnings("unchecked")
|
||||
public boolean handleMouseUp(int x, int y, int mouseButton) {
|
||||
if (!isEditable()) {
|
||||
if (!isEditable() || !getProperties().isVisible()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -54,6 +54,7 @@ import com.vividsolutions.jts.geom.LineString;
|
|||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Aug 29, 2013 2281 bsteffen Rename ToolsUiUitil.
|
||||
* Sep 18, 2013 2360 njensen Don't handle mouse actions when layer is invisible
|
||||
*
|
||||
*
|
||||
* </pre>
|
||||
|
@ -146,7 +147,8 @@ public class InteractiveBaselineUIManager extends InputAdapter implements
|
|||
hoverCoords = null;
|
||||
}
|
||||
|
||||
if (baselinesLayer.isEditable()) {
|
||||
if (baselinesLayer.isEditable()
|
||||
&& baselinesLayer.getProperties().isVisible()) {
|
||||
// Only operate if editable
|
||||
if (inMotion != null) {
|
||||
// Already have something in motion, process the move
|
||||
|
@ -200,7 +202,8 @@ public class InteractiveBaselineUIManager extends InputAdapter implements
|
|||
*/
|
||||
@Override
|
||||
public boolean handleMouseDown(int x, int y, int mouseButton) {
|
||||
if (baselinesLayer.isEditable()) {
|
||||
if (baselinesLayer.isEditable()
|
||||
&& baselinesLayer.getProperties().isVisible()) {
|
||||
Baseline inMotion = baselinesLayer.getLineInMotion();
|
||||
// Only operate if editable
|
||||
if (inMotion != null) {
|
||||
|
@ -251,7 +254,8 @@ public class InteractiveBaselineUIManager extends InputAdapter implements
|
|||
lastX = x;
|
||||
lastY = y;
|
||||
}
|
||||
if (baselinesLayer.isEditable()) {
|
||||
if (baselinesLayer.isEditable()
|
||||
&& baselinesLayer.getProperties().isVisible()) {
|
||||
Baseline inMotion = baselinesLayer.getLineInMotion();
|
||||
// Only process if editable
|
||||
if (selectX >= 0 && selectY >= 0) {
|
||||
|
@ -313,7 +317,8 @@ public class InteractiveBaselineUIManager extends InputAdapter implements
|
|||
lastX = x;
|
||||
lastY = y;
|
||||
}
|
||||
if (baselinesLayer.isEditable()) {
|
||||
if (baselinesLayer.isEditable()
|
||||
&& baselinesLayer.getProperties().isVisible()) {
|
||||
if (deleting) {
|
||||
baselinesLayer.issueRefresh();
|
||||
return true;
|
||||
|
|
Loading…
Add table
Reference in a new issue