On Wed, Aug 11, 2010 at 06:22, Mengu <[email protected]> wrote:
>
> Hello Derrell,
>
> Thank you for the patch. We have applied the patch. The problem is
> "isMouseAction" that comes from e.getData() is undefined.
Ok, I had a bit more time today so I actually tested it this time. :-) Try
attached patch x.patch instead, or apply y.patch on top of what I gave you
yesterday.
Derrell
diff --git a/qooxdoo/framework/source/class/qx/ui/table/columnmodel/Basic.js b/qooxdoo/framework/source/class/qx/ui/table/columnmodel/Basic.js
index ecffdca..9b11f72 100644
--- a/qooxdoo/framework/source/class/qx/ui/table/columnmodel/Basic.js
+++ b/qooxdoo/framework/source/class/qx/ui/table/columnmodel/Basic.js
@@ -210,11 +210,19 @@ qx.Class.define("qx.ui.table.columnmodel.Basic",
/**
* Sets the width of a column.
*
- * @param col {Integer} the model index of the column.
- * @param width {Integer} the new width the column should get in pixels.
+ * @param col {Integer}
+ * The model index of the column.
+ *
+ * @param width {Integer}
+ * The new width the column should get in pixels.
+ *
+ * @param isMouseAction {Boolean}
+ * <i>true</i> if the column width is being changed as a result of a
+ * mouse drag in the header; false or undefined otherwise.
+ *
* @return {void}
*/
- setColumnWidth : function(col, width)
+ setColumnWidth : function(col, width, isMouseAction)
{
if (qx.core.Variant.isSet("qx.debug", "on"))
{
@@ -231,9 +239,10 @@ qx.Class.define("qx.ui.table.columnmodel.Basic",
var data =
{
- col : col,
- newWidth : width,
- oldWidth : oldWidth
+ col : col,
+ newWidth : width,
+ oldWidth : oldWidth,
+ isMouseAction : isMouseAction || false
};
this.fireDataEvent("widthChanged", data);
diff --git a/qooxdoo/framework/source/class/qx/ui/table/pane/Header.js b/qooxdoo/framework/source/class/qx/ui/table/pane/Header.js
index 62e505e..b28e12e 100644
--- a/qooxdoo/framework/source/class/qx/ui/table/pane/Header.js
+++ b/qooxdoo/framework/source/class/qx/ui/table/pane/Header.js
@@ -124,11 +124,19 @@ qx.Class.define("qx.ui.table.pane.Header",
/**
* Sets the column width. This overrides the width from the column model.
*
- * @param col {Integer} the column to change the width for.
- * @param width {Integer} the new width.
+ * @param col {Integer}
+ * The column to change the width for.
+ *
+ * @param width {Integer}
+ * The new width.
+ *
+ * @param isMouseAction {Boolean}
+ * <i>true</i> if the column width is being changed as a result of a
+ * mouse drag in the header; false or undefined otherwise.
+ *
* @return {void}
*/
- setColumnWidth : function(col, width)
+ setColumnWidth : function(col, width, isMouseAction)
{
var child = this.getHeaderWidgetAtColumn(col);
diff --git a/qooxdoo/framework/source/class/qx/ui/table/pane/Scroller.js b/qooxdoo/framework/source/class/qx/ui/table/pane/Scroller.js
index 83b3830..5359683 100644
--- a/qooxdoo/framework/source/class/qx/ui/table/pane/Scroller.js
+++ b/qooxdoo/framework/source/class/qx/ui/table/pane/Scroller.js
@@ -856,9 +856,9 @@ qx.Class.define("qx.ui.table.pane.Scroller",
if (this.getLiveResize()) {
var columnModel = table.getTableColumnModel();
- columnModel.setColumnWidth(this.__resizeColumn, newWidth);
+ columnModel.setColumnWidth(this.__resizeColumn, newWidth, true);
} else {
- this.__header.setColumnWidth(this.__resizeColumn, newWidth);
+ this.__header.setColumnWidth(this.__resizeColumn, newWidth, true);
var paneModel = this.getTablePaneModel();
this._showResizeLine(paneModel.getColumnLeft(this.__resizeColumn) + newWidth);
@@ -1204,7 +1204,9 @@ qx.Class.define("qx.ui.table.pane.Scroller",
// We are currently resizing -> Finish resizing
if (! this.getLiveResize()) {
this._hideResizeLine();
- columnModel.setColumnWidth(this.__resizeColumn, this.__lastResizeWidth);
+ columnModel.setColumnWidth(this.__resizeColumn,
+ this.__lastResizeWidth,
+ true);
}
this.__resizeColumn = null;
diff --git a/qooxdoo/framework/source/class/qx/ui/table/columnmodel/Basic.js b/qooxdoo/framework/source/class/qx/ui/table/columnmodel/Basic.js
index c6c730a..9b11f72 100644
--- a/qooxdoo/framework/source/class/qx/ui/table/columnmodel/Basic.js
+++ b/qooxdoo/framework/source/class/qx/ui/table/columnmodel/Basic.js
@@ -242,7 +242,7 @@ qx.Class.define("qx.ui.table.columnmodel.Basic",
col : col,
newWidth : width,
oldWidth : oldWidth,
- isMouseAction : isMouseAction
+ isMouseAction : isMouseAction || false
};
this.fireDataEvent("widthChanged", data);
diff --git a/qooxdoo/framework/source/class/qx/ui/table/pane/Scroller.js b/qooxdoo/framework/source/class/qx/ui/table/pane/Scroller.js
index 76abd5b..5359683 100644
--- a/qooxdoo/framework/source/class/qx/ui/table/pane/Scroller.js
+++ b/qooxdoo/framework/source/class/qx/ui/table/pane/Scroller.js
@@ -1204,7 +1204,9 @@ qx.Class.define("qx.ui.table.pane.Scroller",
// We are currently resizing -> Finish resizing
if (! this.getLiveResize()) {
this._hideResizeLine();
- columnModel.setColumnWidth(this.__resizeColumn, this.__lastResizeWidth);
+ columnModel.setColumnWidth(this.__resizeColumn,
+ this.__lastResizeWidth,
+ true);
}
this.__resizeColumn = null;
------------------------------------------------------------------------------
This SF.net email is sponsored by
Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel