提交 a715124e 编写于 作者: J jurgen

Spreadsheet refresh fix

上级 e8b0902f
......@@ -448,6 +448,8 @@ public abstract class LightGrid extends Canvas {
{
if (refreshColumns) {
this.removeAll();
} else {
this.resetData();
}
IGridContentProvider contentProvider = getContentProvider();
{
......@@ -461,8 +463,6 @@ public abstract class LightGrid extends Canvas {
this.parentNodes = parents.toArray(new GridNode[parents.size()]);
}
this.displayedToolTipText = null;
this.topIndex = -1;
this.bottomIndex = -1;
if (refreshColumns) {
this.maxColumnDepth = 0;
......@@ -1253,6 +1253,15 @@ public abstract class LightGrid extends Canvas {
public void removeAll()
{
checkWidget();
resetData();
topColumns.clear();
columns.clear();
columnElements = new Object[0];
rowElements = new Object[0];
}
private void resetData() {
deselectAll();
vScroll.setSelection(0);
hScroll.setSelection(0);
......@@ -1262,11 +1271,6 @@ public abstract class LightGrid extends Canvas {
topIndex = -1;
bottomIndex = -1;
shiftSelectionAnchorColumn = null;
topColumns.clear();
columns.clear();
columnElements = new Object[0];
rowElements = new Object[0];
}
/**
......
......@@ -38,7 +38,7 @@ public interface IResultSetPresentation {
String PRES_TOOLS_BEGIN = "rsv_pres_begin";
String PRES_TOOLS_END = "rsv_pres_end";
public enum RowPosition {
enum RowPosition {
FIRST,
PREVIOUS,
NEXT,
......
......@@ -51,11 +51,11 @@ public class ResultSetPropertyTester extends PropertyTester
if (PROP_ACTIVE.equals(property)) {
return true;
} else if (PROP_HAS_DATA.equals(property)) {
return rsv.getModel().getRowCount() > 0;
return rsv.getModel().hasData();
} else if (PROP_HAS_MORE_DATA.equals(property)) {
return rsv.isHasMoreData();
} else if (PROP_CAN_COPY.equals(property)) {
return rsv.getActivePresentation().getCurrentAttribute() != null && rsv.getCurrentRow() != null;
return rsv.getModel().hasData();
} else if (PROP_CAN_PASTE.equals(property) || PROP_CAN_CUT.equals(property)) {
DBDAttributeBinding attr = rsv.getActivePresentation().getCurrentAttribute();
return attr != null && !rsv.isAttributeReadOnly(attr);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册