diff --git a/src/Mod/TechDraw/App/Preferences.cpp b/src/Mod/TechDraw/App/Preferences.cpp index b21fc2f491..6254926082 100644 --- a/src/Mod/TechDraw/App/Preferences.cpp +++ b/src/Mod/TechDraw/App/Preferences.cpp @@ -555,3 +555,14 @@ App::Color Preferences::getAccessibleColor(App::Color orig) } return orig; } + +bool Preferences::autoCorrectDimRefs() +{ + Base::Reference hGrp = App::GetApplication() + .GetUserParameter() + .GetGroup("BaseApp") + ->GetGroup("Preferences") + ->GetGroup("Mod/TechDraw/Dimensions"); + bool correct = hGrp->GetBool("AutoCorrectRefs", true); + return correct; +} diff --git a/src/Mod/TechDraw/App/Preferences.h b/src/Mod/TechDraw/App/Preferences.h index f2cb8fbeb0..90a589d3e4 100644 --- a/src/Mod/TechDraw/App/Preferences.h +++ b/src/Mod/TechDraw/App/Preferences.h @@ -94,6 +94,8 @@ public: static App::Color lightTextColor(); static App::Color lightenColor(App::Color orig); static App::Color getAccessibleColor(App::Color orig); + + static bool autoCorrectDimRefs(); }; }//end namespace TechDraw diff --git a/src/Mod/TechDraw/Gui/DlgPrefsTechDrawAdvanced.ui b/src/Mod/TechDraw/Gui/DlgPrefsTechDrawAdvanced.ui index 02ef961dcb..7efb20ffc0 100644 --- a/src/Mod/TechDraw/Gui/DlgPrefsTechDrawAdvanced.ui +++ b/src/Mod/TechDraw/Gui/DlgPrefsTechDrawAdvanced.ui @@ -7,7 +7,7 @@ 0 0 440 - 353 + 355 @@ -40,228 +40,20 @@ - - - - - 0 - 0 - - - - If checked, TechDraw will attempt to build faces using the -line segments returned by the hidden line removal algorithm. -Faces must be detected in order to use hatching, but there -can be a performance penalty in complex models. - - - Detect Faces - - - true - - - HandleFaces - - - /Mod/TechDraw/General - - - - - - - - 0 - 0 - - - - - 0 - 20 - - - - Highlights border of section cut in section views - - - Show Section Edges - - - true - - - ShowSectionEdges - - - /Mod/TechDraw/General - - - - - - - - 0 - 0 - - - - Dump intermediate results during Section view processing - - - Debug Section - - - debugSection - - - Mod/TechDraw/debug - - - - - - - - 0 - 0 - - - - - 0 - 20 - - - - Dump intermediate results during Detail view processing - - - Debug Detail - - - debugDetail - - - Mod/TechDraw/debug - - - - - - - - 0 - 0 - - - - Include edges with unexpected geometry (zero length etc.) in results - - - Allow Crazy Edges - - - allowCrazyEdge - - - Mod/TechDraw/debug - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - 0 - 0 - - - - - 0 - 20 - - - - - true - - - - Perform a fuse operation on input shape(s) before Section view processing - - - Fuse Before Section - - - SectionFuseFirst - - - Mod/TechDraw/General - - - - - - - - 0 - 20 - - - - Include 2D Objects in projection - - - Show Loose 2D Geom - - - false - - - ShowLoose2d - - - Mod/TechDraw/General - - - - - + + 0 0 - - - 0 - 0 - - - Edge Fuzz + Mark Fuzz - + @@ -302,30 +94,33 @@ Each unit is approx. 0.1 mm wide - - - - - 0 - 0 - - - - Mark Fuzz - - - - - + + 0 0 + + Dump intermediate results during Section view processing + + + Debug Section + + + debugSection + + + Mod/TechDraw/debug + + + + + - 174 + 0 0 @@ -335,41 +130,13 @@ Each unit is approx. 0.1 mm wide 0 - - Selection area around center marks -Each unit is approx. 0.1 mm wide - - - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - 5.000000000000000 - - - MarkFuzz - - - Mod/TechDraw/General - - - - - - - - true - - - Line End Cap Shape + Edge Fuzz - - + + 0 @@ -382,89 +149,21 @@ Each unit is approx. 0.1 mm wide 20 - - - false - - - Shape of line end caps. -Only change unless you know what you are doing! + Dump intermediate results during Detail view processing + + + Debug Detail - EdgeCapStyle + debugDetail - Mod/TechDraw/General - - - - Round - - - - - Square - - - - - Flat - - - - - - - - Max SVG Hatch Tiles + Mod/TechDraw/debug - - - - - 0 - 20 - - - - Limit of 64x64 pixel SVG tiles used to hatch a single face. -For large scalings you might get an error about to many SVG tiles. -Then you need to increase the tile limit. - - - Qt::AlignRight - - - 1 - - - 1000000 - - - 100 - - - 10000 - - - MaxSVGTile - - - Mod/TechDraw/Decorations - - - - - - - Max PAT Hatch Segments - - - - + @@ -515,6 +214,329 @@ when hatching a face with a PAT pattern + + + + + 0 + 0 + + + + + 0 + 20 + + + + Highlights border of section cut in section views + + + Show Section Edges + + + true + + + ShowSectionEdges + + + /Mod/TechDraw/General + + + + + + + + 0 + 20 + + + + Limit of 64x64 pixel SVG tiles used to hatch a single face. +For large scalings you might get an error about to many SVG tiles. +Then you need to increase the tile limit. + + + Qt::AlignRight + + + 1 + + + 1000000 + + + 100 + + + 10000 + + + MaxSVGTile + + + Mod/TechDraw/Decorations + + + + + + + + 0 + 0 + + + + If checked, TechDraw will attempt to build faces using the +line segments returned by the hidden line removal algorithm. +Faces must be detected in order to use hatching, but there +can be a performance penalty in complex models. + + + Detect Faces + + + true + + + HandleFaces + + + /Mod/TechDraw/General + + + + + + + + true + + + + Line End Cap Shape + + + + + + + Max SVG Hatch Tiles + + + + + + + + 0 + 20 + + + + Include 2D Objects in projection + + + Show Loose 2D Geom + + + false + + + ShowLoose2d + + + Mod/TechDraw/General + + + + + + + + 0 + 0 + + + + Include edges with unexpected geometry (zero length etc.) in results + + + Allow Crazy Edges + + + allowCrazyEdge + + + Mod/TechDraw/debug + + + + + + + + 0 + 0 + + + + + 0 + 20 + + + + + true + + + + Perform a fuse operation on input shape(s) before Section view processing + + + Fuse Before Section + + + SectionFuseFirst + + + Mod/TechDraw/General + + + + + + + Max PAT Hatch Segments + + + + + + + + 0 + 0 + + + + + 0 + 20 + + + + + false + + + + Shape of line end caps. +Only change unless you know what you are doing! + + + EdgeCapStyle + + + Mod/TechDraw/General + + + + Round + + + + + Square + + + + + Flat + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 0 + 0 + + + + + 174 + 0 + + + + + 0 + 0 + + + + Selection area around center marks +Each unit is approx. 0.1 mm wide + + + + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + 5.000000000000000 + + + MarkFuzz + + + Mod/TechDraw/General + + + + + + + If checked, sytem will attempt to automatically correct dimension references when the model changes. + + + + + + Auto Correct Dimension Refs + + + false + + + AutoCorrectRefs + + + Mod/TechDraw/Dimensions + + + diff --git a/src/Mod/TechDraw/Gui/DlgPrefsTechDrawAdvancedImp.cpp b/src/Mod/TechDraw/Gui/DlgPrefsTechDrawAdvancedImp.cpp index 9ae876c2bf..f83ce45b5f 100644 --- a/src/Mod/TechDraw/Gui/DlgPrefsTechDrawAdvancedImp.cpp +++ b/src/Mod/TechDraw/Gui/DlgPrefsTechDrawAdvancedImp.cpp @@ -57,6 +57,7 @@ void DlgPrefsTechDrawAdvancedImp::saveSettings() ui->sbMaxTiles->onSave(); ui->sbMaxPat->onSave(); ui->cbReportProgress->onSave(); + ui->cbAutoCorrectRefs->onSave(); } void DlgPrefsTechDrawAdvancedImp::loadSettings() @@ -74,6 +75,7 @@ void DlgPrefsTechDrawAdvancedImp::loadSettings() ui->sbMaxTiles->onRestore(); ui->sbMaxPat->onRestore(); ui->cbReportProgress->onRestore(); + ui->cbAutoCorrectRefs->onRestore(); } /** diff --git a/src/Mod/TechDraw/Gui/Resources/TechDraw.qrc b/src/Mod/TechDraw/Gui/Resources/TechDraw.qrc index aa405f1538..ee02b0c65c 100644 --- a/src/Mod/TechDraw/Gui/Resources/TechDraw.qrc +++ b/src/Mod/TechDraw/Gui/Resources/TechDraw.qrc @@ -157,6 +157,7 @@ icons/TechDraw_TreeView.svg icons/TechDraw_VerticalDimension.svg icons/TechDraw_VerticalExtentDimension.svg + icons/TechDraw_RefError.svg icons/triangle.svg diff --git a/src/Mod/TechDraw/Gui/Resources/icons/TechDraw_RefError.svg b/src/Mod/TechDraw/Gui/Resources/icons/TechDraw_RefError.svg new file mode 100644 index 0000000000..4a1b413f95 --- /dev/null +++ b/src/Mod/TechDraw/Gui/Resources/icons/TechDraw_RefError.svg @@ -0,0 +1,86 @@ + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + +