diff options
author | Sebastian Geerken <devnull@localhost> | 2016-01-01 21:44:01 +0100 |
---|---|---|
committer | Sebastian Geerken <devnull@localhost> | 2016-01-01 21:44:01 +0100 |
commit | 5e3525b6ea2ea893cd0396c01df5c5ed68891a83 (patch) | |
tree | 6bc870e677198cbd7d6d4258d7a3d05d06e9a0b4 /dw/widget.cc | |
parent | 8b3222822da23f2ff82b8b7b2d29a8afe9497c19 (diff) |
SRDOP: Consider references and positions in Widget::getExtremes.
Diffstat (limited to 'dw/widget.cc')
-rw-r--r-- | dw/widget.cc | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/dw/widget.cc b/dw/widget.cc index a87072f0..bbed0ed4 100644 --- a/dw/widget.cc +++ b/dw/widget.cc @@ -69,6 +69,7 @@ Widget::Widget () registerName ("dw::core::Widget", &CLASS_ID); DBG_OBJ_ASSOC_CHILD (&requisitionParams); + DBG_OBJ_ASSOC_CHILD (&extremesParams); flags = (Flags)(NEEDS_RESIZE | EXTREMES_CHANGED); parent = quasiParent = generator = container = NULL; @@ -1025,7 +1026,24 @@ void Widget::getExtremes (Extremes *extremes, int numPos, Widget **references, // Layout::resizeIdle. } - if (extremesChanged ()) { + bool callImpl; + if (extremesChanged ()) + callImpl = true; + else { + // Even if EXTREMES_QUEUED / EXTREMES_CHANGED is not set, calling + // getExtremesImpl is necessary when the relavive positions passed here + // have changed. + SizeParams newParams (numPos, references, x, y); + DBG_OBJ_ASSOC_CHILD (&newParams); + if (newParams.isEquivalent (&extremesParams)) + callImpl = false; + else { + callImpl = true; + extremesParams = newParams; + } + } + + if (callImpl) { calcExtraSpace (false); // For backward compatibility (part 1/2): |