Commit 86ca061c authored by Simon Barner's avatar Simon Barner
Browse files

- Update controls only if the are visible, or if they gain focus again

- This is required to improve the performance during large model transformations that issue numerous UI updates via EContentAdapaters
parent f127af5c
...@@ -46,7 +46,7 @@ import org.fortiss.tooling.base.ui.layout.RectangleGridLayoutDiagramConfiguratio ...@@ -46,7 +46,7 @@ import org.fortiss.tooling.base.ui.layout.RectangleGridLayoutDiagramConfiguratio
* @author eder * @author eder
* @author $Author: hoelzl $ * @author $Author: hoelzl $
* @version $Rev: 18709 $ * @version $Rev: 18709 $
* @ConQAT.Rating GREEN Hash: 5760E371F5ABC44A734936A20AAB2D3B * @ConQAT.Rating YELLOW Hash: 251170408272D361554F4936273918D8
*/ */
public abstract class AllocationDiagramEditPartBase<T extends EObject> extends public abstract class AllocationDiagramEditPartBase<T extends EObject> extends
GraphicalEditPartBase<T> implements NodeEditPart { GraphicalEditPartBase<T> implements NodeEditPart {
...@@ -97,6 +97,9 @@ public abstract class AllocationDiagramEditPartBase<T extends EObject> extends ...@@ -97,6 +97,9 @@ public abstract class AllocationDiagramEditPartBase<T extends EObject> extends
/** {@inheritDoc} */ /** {@inheritDoc} */
@Override @Override
protected void refreshVisuals() { protected void refreshVisuals() {
if(!getFigure().hasFocus()) {
return;
}
super.refreshVisuals(); super.refreshVisuals();
refreshSourceConnections(); refreshSourceConnections();
...@@ -115,6 +118,15 @@ public abstract class AllocationDiagramEditPartBase<T extends EObject> extends ...@@ -115,6 +118,15 @@ public abstract class AllocationDiagramEditPartBase<T extends EObject> extends
} }
} }
/** {@inheritDoc} */
@Override
public void setFocus(boolean value) {
super.setFocus(value);
if(value) {
refreshVisuals();
}
}
/** {@inheritDoc} */ /** {@inheritDoc} */
@Override @Override
public IDiagramLayoutConfiguration getLayoutConfiguration() { public IDiagramLayoutConfiguration getLayoutConfiguration() {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment