[Sketcher] Grid is displayed in 3D view only if sketch is visible
This commit is contained in:
committed by
abdullahtahiriyo
parent
fe04d47b4c
commit
bcf451bac8
@@ -258,8 +258,8 @@ void ViewProvider2DObject::onChanged(const App::Property* prop)
|
||||
// call father
|
||||
ViewProviderPart::onChanged(prop);
|
||||
|
||||
if (prop == &ShowGrid) {
|
||||
if (ShowGrid.getValue())
|
||||
if (prop == &ShowGrid || prop == &Visibility) {
|
||||
if (ShowGrid.getValue() && Visibility.getValue())
|
||||
createGrid();
|
||||
else
|
||||
Gui::coinRemoveAllChildren(GridRoot);
|
||||
|
||||
@@ -294,6 +294,7 @@ void TaskSketcherGeneral::onToggleGridView(bool on)
|
||||
Base::ConnectionBlocker block(changedSketchView);
|
||||
sketchView->ShowGrid.setValue(on);
|
||||
widget->enableGridSettings(on);
|
||||
if (on) sketchView->createGrid();
|
||||
}
|
||||
|
||||
void TaskSketcherGeneral::onSetGridSize(double val)
|
||||
|
||||
@@ -5701,8 +5701,6 @@ bool ViewProviderSketch::setEdit(int ModNum)
|
||||
Base::Console().Warning("ViewProviderSketch::setEdit: could not import Show module. Visibility automation will not work.\n");
|
||||
}
|
||||
|
||||
|
||||
ShowGrid.setValue(true);
|
||||
TightGrid.setValue(false);
|
||||
|
||||
float transparency;
|
||||
@@ -6080,7 +6078,6 @@ void ViewProviderSketch::createEditInventorNodes(void)
|
||||
void ViewProviderSketch::unsetEdit(int ModNum)
|
||||
{
|
||||
Q_UNUSED(ModNum);
|
||||
ShowGrid.setValue(false);
|
||||
TightGrid.setValue(true);
|
||||
|
||||
if(listener) {
|
||||
|
||||
Reference in New Issue
Block a user