Draw constraints/entities when hovered or selected even if invisible.

This goes really well with the related constraint/request lists,
and in general seems very natural.
pull/168/head
whitequark 2017-01-17 11:53:51 +00:00
parent e388d9fd16
commit 8749a175a6
3 changed files with 5 additions and 8 deletions

View File

@ -498,7 +498,8 @@ bool Constraint::DoLineExtend(Canvas *canvas, Canvas::hStroke hcs,
void Constraint::DoLayout(DrawAs how, Canvas *canvas, void Constraint::DoLayout(DrawAs how, Canvas *canvas,
Vector *labelPos, std::vector<Vector> *refs) { Vector *labelPos, std::vector<Vector> *refs) {
if(!IsVisible()) return; if(!(how == DrawAs::HOVERED || how == DrawAs::SELECTED) &&
!IsVisible()) return;
// Unit vectors that describe our current view of the scene. One pixel // Unit vectors that describe our current view of the scene. One pixel
// long, not one actual unit. // long, not one actual unit.

View File

@ -443,7 +443,8 @@ void Entity::GenerateBezierCurves(SBezierList *sbl) const {
} }
void Entity::Draw(DrawAs how, Canvas *canvas) { void Entity::Draw(DrawAs how, Canvas *canvas) {
if(!IsVisible()) return; if(!(how == DrawAs::HOVERED || how == DrawAs::SELECTED) &&
!IsVisible()) return;
int zIndex; int zIndex;
if(IsPoint()) { if(IsPoint()) {

View File

@ -152,11 +152,6 @@ void TextWindow::ScreenHoverConstraint(int link, uint32_t v) {
if(!SS.GW.showConstraints) return; if(!SS.GW.showConstraints) return;
hConstraint hc = { v }; hConstraint hc = { v };
Constraint *c = SK.GetConstraint(hc);
if(c->group.v != SS.GW.activeGroup.v) {
// Only constraints in the active group are visible
return;
}
SS.GW.hover.Clear(); SS.GW.hover.Clear();
SS.GW.hover.constraint = hc; SS.GW.hover.constraint = hc;
SS.GW.hover.emphasized = true; SS.GW.hover.emphasized = true;