| 284 | } |
| 285 | |
| 286 | void 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); |
nothing calls this directly
no test coverage detected