src/toolsets/viewtoolset.cpp

changeset 1123
15e46ea3151f
parent 1119
749fdf61b5cd
child 1130
17f92eb2a30c
equal deleted inserted replaced
1122:795d1c3554b9 1123:15e46ea3151f
69 69
70 for (LDObject* obj : selectedObjects()) 70 for (LDObject* obj : selectedObjects())
71 { 71 {
72 types << obj->type(); 72 types << obj->type();
73 73
74 if (obj->type() == OBJ_SubfileReference) 74 if (obj->type() == LDObjectType::SubfileReference)
75 subfilenames << static_cast<LDSubfileReference*> (obj)->fileInfo()->name(); 75 subfilenames << static_cast<LDSubfileReference*> (obj)->fileInfo()->name();
76 } 76 }
77 77
78 currentDocument()->clearSelection(); 78 currentDocument()->clearSelection();
79 79
83 83
84 if (not types.contains (type)) 84 if (not types.contains (type))
85 continue; 85 continue;
86 86
87 // For subfiles, type check is not enough, we check the name of the document as well. 87 // For subfiles, type check is not enough, we check the name of the document as well.
88 if (type == OBJ_SubfileReference 88 if (type == LDObjectType::SubfileReference
89 and not subfilenames.contains (static_cast<LDSubfileReference*> (obj)->fileInfo()->name())) 89 and not subfilenames.contains (static_cast<LDSubfileReference*> (obj)->fileInfo()->name()))
90 { 90 {
91 continue; 91 continue;
92 } 92 }
93 93
160 m_window->renderer()->refresh(); 160 m_window->renderer()->refresh();
161 } 161 }
162 162
163 void ViewToolset::setDrawDepth() 163 void ViewToolset::setDrawDepth()
164 { 164 {
165 if (m_window->renderer()->camera() == FreeCamera) 165 if (m_window->renderer()->camera() == Camera::Free)
166 return; 166 return;
167 167
168 bool ok; 168 bool ok;
169 double depth = QInputDialog::getDouble (m_window, "Set Draw Depth", 169 double depth = QInputDialog::getDouble (m_window, "Set Draw Depth",
170 format ("Depth value for %1:", m_window->renderer()->currentCameraName()), 170 format ("Depth value for %1:", m_window->renderer()->currentCameraName()),

mercurial