| 266 | } |
| 267 | |
| 268 | void |
| 269 | TreeCanvas::layoutDone(int w, int h, int scale0) { |
| 270 | targetW = w; targetH = h; targetScale = scale0; |
| 271 | |
| 272 | QSize viewport_size = size(); |
| 273 | QAbstractScrollArea* sa = |
| 274 | static_cast<QAbstractScrollArea*>(parentWidget()->parentWidget()); |
| 275 | sa->horizontalScrollBar()->setRange(0,w-viewport_size.width()); |
| 276 | sa->verticalScrollBar()->setRange(0,h-viewport_size.height()); |
| 277 | |
| 278 | if (layoutDoneTimerId == 0) |
| 279 | layoutDoneTimerId = startTimer(15); |
| 280 | } |
| 281 | |
| 282 | void |
| 283 | TreeCanvas::statusChanged(bool finished) { |