MCPcopy Create free account
hub / github.com/FreeCAD/FreeCAD / onChanged

Method onChanged

src/Mod/TechDraw/App/DrawViewSection.cpp:286–355  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

284}
285
286void DrawViewSection::onChanged(const App::Property* prop)
287{
288 if (isRestoring()) {
289 DrawViewPart::onChanged(prop);
290 return;
291 }
292
293 App::Document* doc = getDocument();
294 if (!doc) {
295 // tarfu
296 DrawViewPart::onChanged(prop);
297 return;
298 }
299
300 if (prop == &SectionNormal) {
301 Direction.setValue(SectionNormal.getValue());
302 return;
303 }
304
305 if (prop == &SectionSymbol) {
306 if (getBaseDVP()) {
307 getBaseDVP()->requestPaint();
308 }
309 return;
310 }
311
312 if (prop == &CutSurfaceDisplay) {
313 if (CutSurfaceDisplay.isValue("PatHatch")) {
314 makeLineSets();
315 }
316 requestPaint();
317 return;
318 }
319
320 if (prop == &FileHatchPattern) {
321 replaceSvgIncluded(FileHatchPattern.getValue());
322 requestPaint();
323 return;
324 }
325
326 if (prop == &FileGeomPattern) {
327 replacePatIncluded(FileGeomPattern.getValue());
328 makeLineSets();
329 requestPaint();
330 return;
331 }
332
333 if (prop == &NameGeomPattern) {
334 makeLineSets();
335 requestPaint();
336 return;
337 }
338
339 if (prop == &BaseView) {
340 // if the BaseView is a Section, then the option of using UsePreviousCut is
341 // valid.
342 if (BaseView.getValue() && BaseView.getValue()->isDerivedFrom<TechDraw::DrawViewSection>()) {
343 UsePreviousCut.setStatus(App::Property::ReadOnly, false);

Callers

nothing calls this directly

Calls 9

onChangedFunction · 0.85
getDocumentFunction · 0.70
isRestoringFunction · 0.50
setValueMethod · 0.45
getValueMethod · 0.45
requestPaintMethod · 0.45
isValueMethod · 0.45
setStatusMethod · 0.45
touchMethod · 0.45

Tested by

no test coverage detected