Lines 197-204
Link Here
|
197 |
if (isVisited) return cacheLeft = new FormAttachment (0, 0); |
197 |
if (isVisited) return cacheLeft = new FormAttachment (0, 0); |
198 |
if (left == null) { |
198 |
if (left == null) { |
199 |
if (right == null) return cacheLeft = new FormAttachment (0, 0); |
199 |
if (right == null) return cacheLeft = new FormAttachment (0, 0); |
|
|
200 |
if (right.anchor != null && !right.anchor.initialized) return new FormAttachment (0, 0); // ?? workaround for inifinite loop |
200 |
return cacheLeft = getRightAttachment (control, spacing, flushCache).minus (getWidth (control, flushCache)); |
201 |
return cacheLeft = getRightAttachment (control, spacing, flushCache).minus (getWidth (control, flushCache)); |
201 |
} |
202 |
} |
|
|
203 |
if (left.anchor != null) { |
204 |
return cacheLeft = left.anchor.getFormAttachment (control, spacing, flushCache).plus (left.offset + spacing); |
205 |
} |
202 |
Control leftControl = left.control; |
206 |
Control leftControl = left.control; |
203 |
if (leftControl != null) { |
207 |
if (leftControl != null) { |
204 |
if (leftControl.isDisposed ()) { |
208 |
if (leftControl.isDisposed ()) { |
Lines 239-251
Link Here
|
239 |
return string.substring (index + 1, string.length ()); |
243 |
return string.substring (index + 1, string.length ()); |
240 |
} |
244 |
} |
241 |
|
245 |
|
|
|
246 |
FormAnchor getRightAnchor () { |
247 |
return right == null ? null : right.anchor; |
248 |
} |
249 |
|
242 |
FormAttachment getRightAttachment (Control control, int spacing, boolean flushCache) { |
250 |
FormAttachment getRightAttachment (Control control, int spacing, boolean flushCache) { |
243 |
if (cacheRight != null) return cacheRight; |
251 |
if (cacheRight != null) return cacheRight; |
244 |
if (isVisited) return cacheRight = new FormAttachment (0, getWidth (control, flushCache)); |
252 |
if (isVisited) return cacheRight = new FormAttachment (0, getWidth (control, flushCache)); |
245 |
if (right == null) { |
253 |
if (right == null) { |
246 |
if (left == null) return cacheRight = new FormAttachment (0, getWidth (control, flushCache)); |
254 |
if (left == null) return cacheRight = new FormAttachment (0, getWidth (control, flushCache)); |
|
|
255 |
if (left.anchor != null && !left.anchor.initialized) return new FormAttachment (0, getWidth (control, flushCache)); // ??? workaround fo infinite loop |
247 |
return cacheRight = getLeftAttachment (control, spacing, flushCache).plus (getWidth (control, flushCache)); |
256 |
return cacheRight = getLeftAttachment (control, spacing, flushCache).plus (getWidth (control, flushCache)); |
248 |
} |
257 |
} |
|
|
258 |
if (right.anchor != null) { |
259 |
return cacheRight = right.anchor.getFormAttachment (control, spacing, flushCache).plus (right.offset - spacing); |
260 |
} |
249 |
Control rightControl = right.control; |
261 |
Control rightControl = right.control; |
250 |
if (rightControl != null) { |
262 |
if (rightControl != null) { |
251 |
if (rightControl.isDisposed ()) { |
263 |
if (rightControl.isDisposed ()) { |