activate grid button and widget size
This commit is contained in:
@@ -251,6 +251,22 @@ void Viewport::SelectPuppet(Puppet* prop)
|
||||
Render();
|
||||
}
|
||||
|
||||
void Viewport::SetGridVisible(bool visible)
|
||||
{
|
||||
if (m_GridActor) {
|
||||
m_GridActor->SetVisibility(visible);
|
||||
Render();
|
||||
}
|
||||
}
|
||||
|
||||
bool Viewport::GetGridVisible() const
|
||||
{
|
||||
if (m_GridActor) {
|
||||
return m_GridActor->GetVisibility() != 0;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void Viewport::addProp(vtkProp* prop)
|
||||
{
|
||||
if (m_Renderer) {
|
||||
@@ -270,6 +286,7 @@ void Viewport::RemoveProp(vtkProp* prop)
|
||||
void Viewport::UpdateGrid()
|
||||
{
|
||||
if (!m_Renderer || !m_GridSource) return;
|
||||
if (m_GridActor && !m_GridActor->GetVisibility()) return;
|
||||
|
||||
vtkCamera* camera = m_Renderer->GetActiveCamera();
|
||||
if (!camera) return;
|
||||
|
||||
Reference in New Issue
Block a user