mirror of
https://github.com/brunoherbelin/vimix.git
synced 2025-12-11 18:34:58 +01:00
BugFix; disable mouse over and picking on source initials
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user