Related to issue 25581: Prevents refreshing the views redundantly
authorAugusto Mauch <augusto.mauch@openbravo.com>
Wed, 12 Feb 2014 16:37:31 +0100
changeset 22001 0abad7274229
parent 22000 c0a400dc48bd
child 22002 5c22191ea673
Related to issue 25581: Prevents refreshing the views redundantly
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-view.js
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-view.js	Wed Feb 12 16:10:18 2014 +0100
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-view.js	Wed Feb 12 16:37:31 2014 +0100
@@ -1366,14 +1366,14 @@
           this.childTabSet.tabBar.members[i].hide();
           tabViewPane.hidden = true;
         } else {
-          if (!tabViewPane.data && !tabViewPane.refreshingData) {
+          if (this.childTabSet.visibility === 'hidden') {
+            this.childTabSet.show();
+          }
+          if (tabViewPane.showTabIf && !tabViewPane.data && !tabViewPane.refreshingData && tabViewPane.isVisible()) {
             // If the child tab does not have data yet, refresh it
             tabViewPane.refreshingData = true;
             tabViewPane.refresh();
           }
-          if (this.childTabSet.visibility === 'hidden') {
-            this.childTabSet.show();
-          }
           this.childTabSet.tabBar.members[i].show();
           tabViewPane.hidden = false;
           tabViewPane.updateSubtabVisibility();