Skip to content

Commit

Permalink
adjust netedit lefthand containerStop drawing and stoppingPlace sign …
Browse files Browse the repository at this point in the history
…orientation ref #15566

Signed-off-by: m-kro <[email protected]>
  • Loading branch information
m-kro committed Oct 9, 2024
1 parent a6611fc commit 59e7d09
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
1 change: 0 additions & 1 deletion src/guisim/GUIBusStop.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,6 @@ GUIBusStop::drawGL(const GUIVisualizationSettings& s) const {
glTranslated(0, 0, .1);
GLHelper::setColor(colorSign);
GLHelper::drawFilledCircle((double) 0.9, noPoints);

if (myElement == SUMO_TAG_CONTAINER_STOP) {
GLHelper::drawText("C", Position(), .1, 1.6, color, signRot);
} else if (myElement == SUMO_TAG_TRAIN_STOP) {
Expand Down
2 changes: 1 addition & 1 deletion src/netedit/elements/additional/GNEContainerStop.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ GNEContainerStop::updateGeometry() {
// Obtain a copy of the shape
PositionVector tmpShape = myAdditionalGeometry.getShape();
// move entire shape and update
tmpShape.move2side(2);
tmpShape.move2side(2 * offsetSign);
myAdditionalGeometry.updateGeometry(tmpShape);
// Move shape to side
tmpShape.move2side(myNet->getViewNet()->getVisualisationSettings().stoppingPlaceSettings.stoppingPlaceSignOffset * offsetSign);
Expand Down
3 changes: 2 additions & 1 deletion src/netedit/elements/additional/GNEStoppingPlace.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,8 @@ GNEStoppingPlace::drawSign(const GUIVisualizationSettings& s, const GUIVisualiza
// calculate middle point
const double middlePoint = (myAdditionalGeometry.getShape().length2D() * 0.5);
// calculate rotation
const double rot = (myAdditionalGeometry.getShape().size() <= 1) ? 0 : myAdditionalGeometry.getShape().rotationDegreeAtOffset(middlePoint);
const double rotSign = OptionsCont::getOptions().getBool("lefthand") ? -1 : 1;
const double rot = (myAdditionalGeometry.getShape().size() <= 1) ? 0 : myAdditionalGeometry.getShape().rotationDegreeAtOffset(middlePoint) - 180. * rotSign;
// push matrix
GLHelper::pushMatrix();
// Start drawing sign traslating matrix to signal position
Expand Down

0 comments on commit 59e7d09

Please sign in to comment.