details: https://code.openbravo.com/erp/devel/pi/rev/b0cfc1e49543
changeset: 20725:b0cfc1e49543
user: Asier Lostalé <asier.lostale <at> openbravo.com>
date: Fri Jul 12 15:03:06 2013 +0200
summary: fixed bug 24326: Suboptimal parent tab getter for root tabs
diffstat:
modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/KernelUtils.java
| 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diffs (19 lines):
diff -r 14f80fe54ecf -r b0cfc1e49543
modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/KernelUtils.java
---
a/modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/KernelUtils.java
Thu Jul 11 16:39:35 2013 +0200
+++
b/modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/KernelUtils.java
Fri Jul 12 15:03:06 2013 +0200
@@ -382,9 +382,14 @@
*
* @param tab
* The tab the object belongs to
- * @return The parent tab of the given tab
+ * @return The parent tab of the given tab, <code>null</code> in case the
tab is root
*/
public Tab getParentTab(Tab tab) {
+ if (tab.getTabLevel() == 0) {
+ // root level, there is no parent
+ return null;
+ }
+
List<Tab> tabsOfWindow = tab.getWindow().getADTabList();
ArrayList<Entity> entities = new ArrayList<Entity>();
HashMap<Entity, Tab> tabOfEntity = new HashMap<Entity, Tab>();
------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits