Skip to content

Commit

Permalink
Removed unused function. Refs #13894
Browse files Browse the repository at this point in the history
  • Loading branch information
palvarezlopez committed Dec 19, 2023
1 parent 24aa922 commit c159935
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 17 deletions.
14 changes: 4 additions & 10 deletions src/netedit/GNEViewNet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -505,12 +505,6 @@ GNEViewNet::getObjectsUnderCursor() const {
}


void
GNEViewNet::updateObjectsUnderCursor(const Position& pos) {
//myObjectsUnderCursor.updateObjectUnderCursor(/*getGUIGlObjectsAtPosition(pos, 0.1)*/);
}


const GNEViewNetHelper::MoveMultipleElementValues&
GNEViewNet::getMoveMultipleElementValues() const {
return myMoveMultipleElementValues;
Expand Down Expand Up @@ -1301,8 +1295,8 @@ GNEViewNet::doPaintGL(int mode, const Boundary& bound) {
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glEnable(GL_DEPTH_TEST);
// first step: obtain all objects under cursor
updateObjectsUnderCursor();
// first step: update objects under cursor
updateObjectsUnderCursor(myNet->getViewNet()->getPositionInformation());
// check if force drawing for rectangle selection
if (myVisualizationSettings->forceDrawForRectangleSelection) {
myVisualizationSettings->drawForRectangleSelection = true;
Expand Down Expand Up @@ -3315,7 +3309,7 @@ GNEViewNet::updateCursor() {


void
GNEViewNet::updateObjectsUnderCursor() {
GNEViewNet::updateObjectsUnderCursor(const Position &pos) {
// clear post drawing elements
gPostDrawing.clearElements();
// push matrix
Expand All @@ -3326,7 +3320,7 @@ GNEViewNet::updateObjectsUnderCursor() {
myVisualizationSettings->drawForRectangleSelection = true;
// create an small boundary
Boundary cursorBoundary;
cursorBoundary.add(myNet->getViewNet()->getPositionInformation());
cursorBoundary.add(pos);
cursorBoundary.grow(POSITION_EPS);
// draw all GL elements within the small boundary
drawGLElements(cursorBoundary);
Expand Down
7 changes: 2 additions & 5 deletions src/netedit/GNEViewNet.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,6 @@ class GNEViewNet : public GUISUMOAbstractView {
/// @brief get objects under cursor
const GNEViewNetHelper::ObjectsUnderCursor& getObjectsUnderCursor() const;

/// @brief Update objects under cursor in the given position
void updateObjectsUnderCursor(const Position& pos);

/// @brief get move multiple element values
const GNEViewNetHelper::MoveMultipleElementValues& getMoveMultipleElementValues() const;

Expand Down Expand Up @@ -784,8 +781,8 @@ class GNEViewNet : public GUISUMOAbstractView {
/// @brief draw functions
/// @{

/// @brief get objects under cursor
void updateObjectsUnderCursor();
/// @brief get objects under given position
void updateObjectsUnderCursor(const Position &pos);

/// @brief draw all gl elements of netedit
int drawGLElements(const Boundary& bound) const;
Expand Down
2 changes: 0 additions & 2 deletions src/netedit/elements/network/GNEJunction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1849,8 +1849,6 @@ GNEJunction::setMoveShape(const GNEMoveResult& moveResult) {

void
GNEJunction::commitMoveShape(const GNEMoveResult& moveResult, GNEUndoList* undoList) {
// update objects in the current junction position
myNet->getViewNet()->updateObjectsUnderCursor(moveResult.shapeToUpdate.front());
// check if there is another junction in the same position
GNEJunction* secondJunction = nullptr;
const auto& clickedJunctions = myNet->getViewNet()->getObjectsUnderCursor().getClickedJunctions();
Expand Down

0 comments on commit c159935

Please sign in to comment.