BugFix; disable mouse over and picking on source initials

This commit is contained in:
Bruno Herbelin
2023-05-11 19:58:36 +02:00
parent 39d4002491
commit 4930c07e9c
2 changed files with 12 additions and 14 deletions

View File

@@ -349,8 +349,6 @@ View::Cursor LayerView::over (glm::vec2 pos)
if (s != nullptr) {
s->symbol_->color = glm::vec4( COLOR_HIGHLIGHT_SOURCE, 1.f );
s->initial_0_->color = glm::vec4( COLOR_HIGHLIGHT_SOURCE, 1.f );
s->initial_1_->color = glm::vec4( COLOR_HIGHLIGHT_SOURCE, 1.f );
const ImVec4 h = ImGuiToolkit::HighlightColor();
// overlay symbol

View File

@@ -221,21 +221,21 @@ void PickingVisitor::visit(Symbol& n)
}
void PickingVisitor::visit(Character& n)
void PickingVisitor::visit(Character& )
{
// discard if not visible or if not exactly one point given for picking
if ((!n.visible_ && !force_) || points_.size() != 1)
return;
// Not working ; disabled until needed
// // discard if not visible or if not exactly one point given for picking
// if ((!n.visible_ && !force_) || points_.size() != 1)
// return;
// apply inverse transform to the point of interest
glm::vec4 P = glm::inverse(modelview_) * glm::vec4( points_[0], 1.f );
// test bounding box for picking from a single point
if ( n.bbox().contains( glm::vec3(P)) ) {
// add this to the nodes picked
nodes_.push_back( std::pair(&n, glm::vec2(P)) );
}
// // apply inverse transform to the point of interest
// glm::vec4 P = glm::inverse(modelview_) * glm::vec4( points_[0], 1.f );
// // test bounding box for picking from a single point
// if ( n.bbox().contains( glm::vec3(P)) ) {
// // add this to the nodes picked
// nodes_.push_back( std::pair(&n, glm::vec2(P)) );
// }
}
void PickingVisitor::visit(Scene &n)