Beispiel #1
0
void KstViewLegend::updateSelf() {
  bool wasDirty(dirty());
  KstBorderedViewObject::updateSelf();
  if (wasDirty) {
    adjustSizeForText(_parent->contentsRect());
    drawToBuffer();
  }
}
void KstViewLabel::updateSelf() {
  bool wasDirty(dirty());
  KstBorderedViewObject::updateSelf();

  // FIXME: remove this once update() is called often enough.
  if (!wasDirty) {
    _cache.update();

    if (!_cache.valid) {
      wasDirty = true;
    }
  }

  if (wasDirty) {
    adjustSizeForText(_parent->geometry());
    drawToBuffer(_parsed);
  }
}