You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pivot.apache.org by no...@apache.org on 2009/10/29 14:33:54 UTC

svn commit: r830937 - /incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/terra/TerraSheetSkin.java

Author: noelgrandin
Date: Thu Oct 29 13:33:53 2009
New Revision: 830937

URL: http://svn.apache.org/viewvc?rev=830937&view=rev
Log:
fix: the sheet was resizable even if the sheet icon was not visible

Modified:
    incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/terra/TerraSheetSkin.java

Modified: incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/terra/TerraSheetSkin.java
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/terra/TerraSheetSkin.java?rev=830937&r1=830936&r2=830937&view=diff
==============================================================================
--- incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/terra/TerraSheetSkin.java (original)
+++ incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/terra/TerraSheetSkin.java Thu Oct 29 13:33:53 2009
@@ -402,7 +402,7 @@
             Cursor cursor = null;
             Bounds resizeHandleBounds = resizeHandle.getBounds();
 
-            if (resizeHandleBounds.contains(x, y)) {
+            if (resizable && resizeHandleBounds.contains(x, y)) {
                 boolean preferredWidthSet = component.isPreferredWidthSet();
                 boolean preferredHeightSet = component.isPreferredHeightSet();
 
@@ -432,7 +432,7 @@
 
         boolean consumed = super.mouseDown(component, button, x, y);
 
-        if (button == Mouse.Button.LEFT) {
+        if (resizable && button == Mouse.Button.LEFT) {
             Bounds resizeHandleBounds = resizeHandle.getBounds();
 
             if (resizeHandleBounds.contains(x, y)) {