184{
185
186
187 bool drawStyleAttached(
m_d->group->findChild(
m_d->drawStyle)>=0);
188 if (
m_d->linewidthsDisabled&&
m_d->pointsizesDisabled) {
189 if (drawStyleAttached)
190 m_d->group->removeChild(
m_d->drawStyle);
191 } else {
192 if (!drawStyleAttached)
193 m_d->group->addChild(
m_d->drawStyle);
194 }
195
196 bool complexityAttached(
m_d->group->findChild(
m_d->complexity)>=0);
197 if (
m_d->complexityDisabled) {
198 if (complexityAttached)
199 m_d->group->removeChild(
m_d->complexity);
200 } else {
201 if (!complexityAttached)
202 m_d->group->addChild(
m_d->complexity);
203 }
204
205 bool lightModelAttached(
m_d->group->findChild(
m_d->baseLightModel)>=0);
206 bool lightModelAttachedGoal = !
m_d->baselightingDisabled &&
m_d->ui.checkBox_useBaseLightModel->isChecked();
207 if (lightModelAttachedGoal!=lightModelAttached) {
208 if (lightModelAttached)
209 m_d->group->removeChild(
m_d->baseLightModel);
210 else
211 m_d->group->addChild(
m_d->baseLightModel);
212 }
213
214
216 if (
m_d->lastEmittedComplexity!=complexityval) {
217 m_d->lastEmittedComplexity=complexityval;
219 }
220
221
222 if (!
m_d->complexityDisabled){
223
224 complexityval = std::min<double>(1.0,std::max<double>(0.0,0.01+0.991*complexityval));
225 }
226 if (
m_d->complexity->value.getValue()!=complexityval){
227 m_d->complexity->value.setValue(complexityval);
228 }
229 if (!
m_d->linewidthsDisabled||!
m_d->pointsizesDisabled) {
232 if (
m_d->drawStyle->lineWidth.getValue()!=val_lw)
233 m_d->drawStyle->lineWidth = val_lw;
234 if (
m_d->drawStyle->pointSize.getValue()!=val_ps)
235 m_d->drawStyle->pointSize = val_ps;
236 }
237
238
239}