提交 4c1ecfee 编写于 作者: S Serge Rider

#7584 Row coloring fixes (for custom SQL queries)


Former-commit-id: ede152cc
上级 14a215ed
......@@ -104,7 +104,11 @@ class ColorSettingsDialog extends BaseDialog {
this.resultSetViewer = resultSetViewer;
this.attribute = attr;
this.row = row;
this.vEntitySrc = DBVUtils.getVirtualEntity(resultSetViewer.getDataContainer(), true);
ResultSetModel model = resultSetViewer.getModel();
this.vEntitySrc = model.isSingleSource() ?
DBVUtils.getVirtualEntity(model.getSingleSource(), true) :
DBVUtils.getVirtualEntity(resultSetViewer.getDataContainer(), true);
this.vEntity = new DBVEntity(vEntitySrc.getContainer(), vEntitySrc, vEntitySrc.getModel());
DEFAULT_RGB = resultSetViewer.getControl().getDisplay().getSystemColor(SWT.COLOR_WIDGET_BACKGROUND).getRGB();
......
......@@ -4460,7 +4460,10 @@ public class ResultSetViewer extends Viewer
DBVEntity getVirtualEntity(DBDAttributeBinding binding)
throws IllegalStateException
{
return DBVUtils.getVirtualEntity(binding, true);
DBSEntity singleSource = model.getSingleSource();
return singleSource != null ?
DBVUtils.getVirtualEntity(singleSource, true) :
DBVUtils.getVirtualEntity(binding, true);
}
void updateColors(DBVEntity entity) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册