Browse Source

Revert "Assert that connector needing layout is attached (#11698)"

This reverts commit cb7b02d4e5

The assert is not a good idea because it is triggered when a connector registers a dependency in its init method.

Merge: no

Change-Id: I1f5a99af8f0af7b3329a1a596073ba09e55e18dc
tags/7.1.0
Leif Åstrand 11 years ago
parent
commit
7a1ab60fee
1 changed files with 0 additions and 13 deletions
  1. 0
    13
      client/src/com/vaadin/client/LayoutManager.java

+ 0
- 13
client/src/com/vaadin/client/LayoutManager.java View File

@@ -827,7 +827,6 @@ public class LayoutManager {
* the managed layout that should be layouted
*/
public final void setNeedsHorizontalLayout(ManagedLayout layout) {
assert isAttached(layout);
needsHorizontalLayout.add(layout.getConnectorId());
}

@@ -843,21 +842,9 @@ public class LayoutManager {
* the managed layout that should be layouted
*/
public final void setNeedsVerticalLayout(ManagedLayout layout) {
assert isAttached(layout);
needsVerticalLayout.add(layout.getConnectorId());
}

private boolean isAttached(ServerConnector connector) {
while (connector != null) {
connector = connector.getParent();
if (connector == connection.getUIConnector()) {
return true;
}
}
// Reaching null parent before reaching UI connector -> not attached
return false;
}

/**
* Gets the outer height (including margins, paddings and borders) of the
* given element, provided that it has been measured. These elements are

Loading…
Cancel
Save