Skip to content

Commit

Permalink
Merge branch 'master' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
esocode committed Feb 12, 2018
2 parents 8b0b2ed + c8ccf45 commit 801ec68
Showing 1 changed file with 19 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,7 @@ public void collectInput(List<DataElement<?>> rModifiedElements)

if (nSelection >= 0)
{
DataElementUI<?> rDataElementUI = getDataElementUI(nSelection);

rDataElementUI.collectInput(rModifiedElements);
getDataElementUI(nSelection).collectInput(rModifiedElements);
}
}

Expand All @@ -132,7 +130,14 @@ public void handleEvent(EWTEvent rEvent)

if (nSelection >= 0)
{
getDataElementUI(nSelection).update();
DataElementUI<?> rDataElementUI = getDataElementUI(nSelection);

// can be NULL because GWT tab panel fires selection events on
// clear() which is performed on a rebuild
if (rDataElementUI != null)
{
rDataElementUI.update();
}
}
}

Expand All @@ -146,6 +151,15 @@ public void setSelectedElement(int nElement)
aSwitchPanel.setSelection(nElement);
}

/***************************************
* {@inheritDoc}
*/
@Override
public void update(DataElementList rNewDataElementList, boolean bUpdateUI)
{
super.update(rNewDataElementList, bUpdateUI);
}

/***************************************
* {@inheritDoc}
*/
Expand Down Expand Up @@ -207,8 +221,6 @@ protected void buildElementUIs()
setSelectedElement(getDataElementList().getProperty(CURRENT_SELECTION,
0));
}

aSwitchPanel.addEventListener(EventType.SELECTION, this);
}

/***************************************
Expand Down Expand Up @@ -245,6 +257,7 @@ protected ContainerBuilder<? extends Panel> createPanel(
}

aSwitchPanel = aPanelBuilder.getContainer();
aSwitchPanel.addEventListener(EventType.SELECTION, this);

return aPanelBuilder;
}
Expand All @@ -262,8 +275,6 @@ protected ContainerBuilder<? extends Panel> createPanel(
*/
private DataElementUI<?> getDataElementUI(int nIndex)
{
assert nIndex >= 0 && nIndex < getDataElementUIs().size();

Iterator<DataElementUI<?>> rUIs =
getDataElementUIs().values().iterator();

Expand Down

0 comments on commit 801ec68

Please sign in to comment.