mirror of
https://github.com/overte-org/overte.git
synced 2025-04-22 16:13:28 +02:00
Merge branch 'master' of https://github.com/worklist/hifi
This commit is contained in:
commit
96e8f339f5
2 changed files with 9 additions and 2 deletions
|
@ -1256,7 +1256,8 @@ void Application::mousePressEvent(QMouseEvent* event) {
|
|||
pasteVoxels();
|
||||
}
|
||||
|
||||
if (MAKE_SOUND_ON_VOXEL_CLICK && _isHoverVoxel && !_isHoverVoxelSounding) {
|
||||
if (!Menu::getInstance()->isOptionChecked(MenuOption::VoxelDeleteMode) &&
|
||||
MAKE_SOUND_ON_VOXEL_CLICK && _isHoverVoxel && !_isHoverVoxelSounding) {
|
||||
_hoverVoxelOriginalColor[0] = _hoverVoxel.red;
|
||||
_hoverVoxelOriginalColor[1] = _hoverVoxel.green;
|
||||
_hoverVoxelOriginalColor[2] = _hoverVoxel.blue;
|
||||
|
|
|
@ -54,6 +54,8 @@ void VoxelTreeElement::splitChildren() {
|
|||
for (int i = 0; i < NUMBER_OF_CHILDREN; i++) {
|
||||
addChildAtIndex(i)->setColor(ourColor);
|
||||
}
|
||||
nodeColor noColor = { 0, 0, 0, 0};
|
||||
setColor(noColor); // set our own color to noColor so we are a pure non-leaf
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -143,7 +145,11 @@ void VoxelTreeElement::setColor(const nodeColor& color) {
|
|||
memcpy(&_currentColor,&color,sizeof(nodeColor));
|
||||
}
|
||||
_isDirty = true;
|
||||
_density = 1.0f; // If color set, assume leaf, re-averaging will update density if needed.
|
||||
if (color[3]) {
|
||||
_density = 1.0f; // If color set, assume leaf, re-averaging will update density if needed.
|
||||
} else {
|
||||
_density = 0.0f;
|
||||
}
|
||||
markWithChangedTime();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue