Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace Q_ASSERT by qWarning to avoid crash in debug #948

Merged
merged 1 commit into from
Feb 1, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions Libs/Widgets/ctkRangeWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -374,10 +374,13 @@ void ctkRangeWidget::setRange(double min, double max)
d->SettingSliderRange = false;
if (!d->useCustomSpinBoxesLimits())
{
Q_ASSERT(d->equal(d->MinimumSpinBox->minimum(), d->Slider->minimum()));
Q_ASSERT(d->equal(d->MaximumSpinBox->maximum(), d->Slider->maximum()));
Q_ASSERT(d->equal(d->Slider->minimumValue(), d->MinimumSpinBox->value()));
Q_ASSERT(d->equal(d->Slider->maximumValue(), d->MaximumSpinBox->value()));
if (!(d->equal(d->MinimumSpinBox->minimum(), d->Slider->minimum())) ||
!(d->equal(d->MaximumSpinBox->maximum(), d->Slider->maximum())) ||
!(d->equal(d->Slider->minimumValue(), d->MinimumSpinBox->value())) ||
!(d->equal(d->Slider->maximumValue(), d->MaximumSpinBox->value())))
{
qWarning("ctkRangeWidget::setRange : slider and spinbox are not synchronized");
}
}
d->updateSpinBoxWidth();
if (!d->useCustomSpinBoxesLimits())
Expand Down