void KstHsDialog::fillFieldsForEdit() { KstHistogramPtr hp; hp = kst_cast<KstHistogram>(_dp); if (hp) { hp->readLock(); _tagName->setText(hp->tagName()); _w->_vector->setSelection(hp->vTag()); _w->N->setValue(hp->nBins()); _w->Min->setText(QString::number(hp->vX()->min() - (hp->width()/2.0))); _w->Max->setText(QString::number(hp->vX()->max() + (hp->width()/2.0))); _w->_realTimeAutoBin->setChecked(hp->realTimeAutoBin()); if (hp->isNormPercent()) { _w->NormIsPercent->setChecked(true); } else if (hp->isNormFraction()) { _w->NormIsFraction->setChecked(true); } else if (hp->isNormOne()) { _w->PeakIs1->setChecked(true); } else { _w->NormIsNumber->setChecked(true); } hp->unlock(); updateButtons(); // can't edit curve props from here.... _w->_curveAppearance->hide(); _w->_curvePlacement->hide(); _legendText->hide(); _legendLabel->hide(); adjustSize(); resize(minimumSizeHint()); setFixedHeight(height()); } }