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
parent
e388d9fd16
commit
8749a175a6
|
@ -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.
|
||||||
|
|
|
@ -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()) {
|
||||||
|
|
|
@ -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;
|
||||||
|
|
Loading…
Reference in New Issue