Lock behavior change: do not show lock icon on unlocked inactive sources

Show unlocked icon only when active, show locked icon always
This commit is contained in:
Bruno Herbelin
2022-04-09 19:29:37 +02:00
parent 3e41655902
commit 220df8918c
4 changed files with 7 additions and 5 deletions

View File

@@ -449,7 +449,8 @@ std::pair<Node *, glm::vec2> GeometryView::pick(glm::vec2 P)
// pick on the lock icon; unlock source
else if ( UserInterface::manager().ctrlModifier() && pick.first == current->lock_ ) {
lock(current, false);
pick = { nullptr, glm::vec2(0.f) };
pick = { current->locker_, pick.second };
// pick = { nullptr, glm::vec2(0.f) };
}
// pick on the open lock icon; lock source and cancel pick
else if ( UserInterface::manager().ctrlModifier() && pick.first == current->unlock_ ) {