From 40d3121a8600dc2a5bd0e8a91e6654ee88876b2c Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Wed, 18 Sep 2013 09:48:08 -0500 Subject: [PATCH] IDEMPIERE-1323 Zoom Condition bug / fix issue IDEMPIERE-1358 --- .../src/org/adempiere/webui/apps/AEnv.java | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/AEnv.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/AEnv.java index 9eca46c30c..1582fc0d6d 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/AEnv.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/AEnv.java @@ -160,6 +160,21 @@ public final class AEnv zoom(AD_Window_ID, MQuery.getEqualQuery(table.getKeyColumns()[0], Record_ID)); } // zoom + /************************************************************************* + * Zoom + * @param AD_Table_ID + * @param Record_ID + * @param query + */ + public static void zoom (int AD_Table_ID, int Record_ID, MQuery query) + { + int AD_Window_ID = Env.getZoomWindowID(AD_Table_ID, Record_ID); + // Nothing to Zoom to + if (AD_Window_ID == 0) + return; + zoom(AD_Window_ID, query); + } // zoom + /** * Exit System * @param status System exit status (usually 0 for no error) @@ -388,7 +403,7 @@ public final class AEnv } if (value instanceof Integer && ((Integer) value).intValue() >= 0 && zoomQuery != null && zoomQuery.getZoomTableName() != null) { int tableId = MTable.getTable_ID(zoomQuery.getZoomTableName()); - zoom(tableId, ((Integer) value).intValue()); + zoom(tableId, ((Integer) value).intValue(), zoomQuery); } else { int windowId = lookup.getZoom(zoomQuery); zoom(windowId, zoomQuery);