Skip to content

Commit

Permalink
Renamed function isMovingElements() to avoid confusions. Refs #12
Browse files Browse the repository at this point in the history
palvarezlopez committed Aug 19, 2024
1 parent a78ef07 commit 581767e
Showing 23 changed files with 74 additions and 74 deletions.
4 changes: 2 additions & 2 deletions src/netedit/GNEViewNet.cpp
Original file line number Diff line number Diff line change
@@ -1913,8 +1913,8 @@ GNEViewNet::drawTranslateFrontAttributeCarrier(const GNEAttributeCarrier* AC, do


bool
GNEViewNet::isMovingElement() const {
return myMoveSingleElement.isMovingElements() || myMoveMultipleElements.isMovingElements();
GNEViewNet::isCurrentlyMovingElements() const {
return myMoveSingleElement.isCurrentlyMovingSingleElement() || myMoveMultipleElements.isCurrentlyMovingMultipleElements();
}


2 changes: 1 addition & 1 deletion src/netedit/GNEViewNet.h
Original file line number Diff line number Diff line change
@@ -534,7 +534,7 @@ class GNEViewNet : public GUISUMOAbstractView {
void drawTranslateFrontAttributeCarrier(const GNEAttributeCarrier* AC, double typeOrLayer, const double extraOffset = 0);

/// @brief check if an element is being moved
bool isMovingElement() const;
bool isCurrentlyMovingElements() const;

/// @brief check if given element is locked (used for drawing select and delete contour)
bool checkOverLockedElement(const GUIGlObject* GLObject, const bool isSelected) const;
4 changes: 2 additions & 2 deletions src/netedit/GNEViewNetHelper.cpp
Original file line number Diff line number Diff line change
@@ -1352,7 +1352,7 @@ GNEViewNetHelper::MoveSingleElementModul::finishMoveSingleElement() {


bool
GNEViewNetHelper::MoveSingleElementModul::isMovingElements() const {
GNEViewNetHelper::MoveSingleElementModul::isCurrentlyMovingSingleElement() const {
return myMoveOperations.size() > 0;
}

@@ -1469,7 +1469,7 @@ GNEViewNetHelper::MoveMultipleElementModul::getEdgeOffset() const {


bool
GNEViewNetHelper::MoveMultipleElementModul::isMovingElements() const {
GNEViewNetHelper::MoveMultipleElementModul::isCurrentlyMovingMultipleElements() const {
return myMoveOperations.size() > 0;
}

4 changes: 2 additions & 2 deletions src/netedit/GNEViewNetHelper.h
Original file line number Diff line number Diff line change
@@ -1042,7 +1042,7 @@ struct GNEViewNetHelper {
void finishMoveSingleElement();

/// @brief check if there are moving elements
bool isMovingElements() const;
bool isCurrentlyMovingSingleElement() const;

protected:
/// @brief calculate offset
@@ -1087,7 +1087,7 @@ struct GNEViewNetHelper {
double getEdgeOffset() const;

/// @brief check if there are moving elements
bool isMovingElements() const;
bool isCurrentlyMovingMultipleElements() const;

protected:
/// @brief calculate move offset
2 changes: 1 addition & 1 deletion src/netedit/elements/additional/GNEAccess.cpp
Original file line number Diff line number Diff line change
@@ -192,7 +192,7 @@ GNEAccess::checkDrawMoveContour() const {
// get edit modes
const auto& editModes = myNet->getViewNet()->getEditModes();
// check if we're in move mode
if (!myNet->getViewNet()->isMovingElement() && editModes.isCurrentSupermodeNetwork() &&
if (!myNet->getViewNet()->isCurrentlyMovingElements() && editModes.isCurrentSupermodeNetwork() &&
(editModes.networkEditMode == NetworkEditMode::NETWORK_MOVE) && myNet->getViewNet()->checkOverLockedElement(this, mySelected)) {
// only move the first element
return myNet->getViewNet()->getViewObjectsSelector().getGUIGlObjectFront() == this;
74 changes: 37 additions & 37 deletions src/netedit/elements/additional/GNECalibrator.cpp
Original file line number Diff line number Diff line change
@@ -36,10 +36,10 @@

GNECalibrator::GNECalibrator(SumoXMLTag tag, GNENet* net) :
GNEAdditional("", net, GLO_CALIBRATOR, tag, GUIIconSubSys::getIcon(GUIIcon::CALIBRATOR), "", {}, {}, {}, {}, {}, {}),
myPositionOverLane(0),
myFrequency(0),
myJamThreshold(0),
myCalibratorContours(new std::vector<GNEContour*>()) {
myPositionOverLane(0),
myFrequency(0),
myJamThreshold(0),
myCalibratorContours(new std::vector<GNEContour*>()) {
// reset default values
resetDefaultValues();
}
@@ -48,13 +48,13 @@ GNECalibrator::GNECalibrator(SumoXMLTag tag, GNENet* net) :
GNECalibrator::GNECalibrator(const std::string& id, GNENet* net, GNEEdge* edge, double pos, SUMOTime frequency, const std::string& name,
const std::string& output, const double jamThreshold, const std::vector<std::string>& vTypes, const Parameterised::Map& parameters) :
GNEAdditional(id, net, GLO_CALIBRATOR, SUMO_TAG_CALIBRATOR, GUIIconSubSys::getIcon(GUIIcon::CALIBRATOR), name, {}, {edge}, {}, {}, {}, {}),
Parameterised(parameters),
myPositionOverLane(pos),
myFrequency(frequency),
myOutput(output),
myJamThreshold(jamThreshold),
myVTypes(vTypes),
myCalibratorContours(new std::vector<GNEContour*>()) {
Parameterised(parameters),
myPositionOverLane(pos),
myFrequency(frequency),
myOutput(output),
myJamThreshold(jamThreshold),
myVTypes(vTypes),
myCalibratorContours(new std::vector<GNEContour*>()) {
// update centering boundary without updating grid
updateCenteringBoundary(false);
}
@@ -64,13 +64,13 @@ GNECalibrator::GNECalibrator(const std::string& id, GNENet* net, GNEEdge* edge,
const std::string& output, GNEAdditional* routeProbe, const double jamThreshold, const std::vector<std::string>& vTypes,
const Parameterised::Map& parameters) :
GNEAdditional(id, net, GLO_CALIBRATOR, SUMO_TAG_CALIBRATOR, GUIIconSubSys::getIcon(GUIIcon::CALIBRATOR), name, {}, {edge}, {}, {routeProbe}, {}, {}),
Parameterised(parameters),
myPositionOverLane(pos),
myFrequency(frequency),
myOutput(output),
myJamThreshold(jamThreshold),
myVTypes(vTypes),
myCalibratorContours(new std::vector<GNEContour*>()) {
Parameterised(parameters),
myPositionOverLane(pos),
myFrequency(frequency),
myOutput(output),
myJamThreshold(jamThreshold),
myVTypes(vTypes),
myCalibratorContours(new std::vector<GNEContour*>()) {
// update centering boundary without updating grid
updateCenteringBoundary(false);
}
@@ -79,13 +79,13 @@ GNECalibrator::GNECalibrator(const std::string& id, GNENet* net, GNEEdge* edge,
GNECalibrator::GNECalibrator(const std::string& id, GNENet* net, GNELane* lane, double pos, SUMOTime frequency, const std::string& name,
const std::string& output, const double jamThreshold, const std::vector<std::string>& vTypes, const Parameterised::Map& parameters) :
GNEAdditional(id, net, GLO_CALIBRATOR, GNE_TAG_CALIBRATOR_LANE, GUIIconSubSys::getIcon(GUIIcon::CALIBRATOR), name, {}, {}, {lane}, {}, {}, {}),
Parameterised(parameters),
myPositionOverLane(pos),
myFrequency(frequency),
myOutput(output),
myJamThreshold(jamThreshold),
myVTypes(vTypes),
myCalibratorContours(new std::vector<GNEContour*>()) {
Parameterised(parameters),
myPositionOverLane(pos),
myFrequency(frequency),
myOutput(output),
myJamThreshold(jamThreshold),
myVTypes(vTypes),
myCalibratorContours(new std::vector<GNEContour*>()) {
// update centering boundary without updating grid
updateCenteringBoundary(false);
}
@@ -95,13 +95,13 @@ GNECalibrator::GNECalibrator(const std::string& id, GNENet* net, GNELane* lane,
const std::string& output, GNEAdditional* routeProbe, const double jamThreshold, const std::vector<std::string>& vTypes,
const Parameterised::Map& parameters) :
GNEAdditional(id, net, GLO_CALIBRATOR, GNE_TAG_CALIBRATOR_LANE, GUIIconSubSys::getIcon(GUIIcon::CALIBRATOR), name, {}, {}, {lane}, {routeProbe}, {}, {}),
Parameterised(parameters),
myPositionOverLane(pos),
myFrequency(frequency),
myOutput(output),
myJamThreshold(jamThreshold),
myVTypes(vTypes),
myCalibratorContours(new std::vector<GNEContour*>()) {
Parameterised(parameters),
myPositionOverLane(pos),
myFrequency(frequency),
myOutput(output),
myJamThreshold(jamThreshold),
myVTypes(vTypes),
myCalibratorContours(new std::vector<GNEContour*>()) {
// update centering boundary without updating grid
updateCenteringBoundary(false);
}
@@ -202,7 +202,7 @@ GNECalibrator::updateGeometry() {
}
myEdgeCalibratorGeometries.clear();
// iterate over every lane and upadte geometries
for (const auto &lane : getParentEdges().front()->getLanes()) {
for (const auto& lane : getParentEdges().front()->getLanes()) {
if (lane == getParentEdges().front()->getLanes().front()) {
myAdditionalGeometry.updateGeometry(lane->getLaneShape(), myPositionOverLane, 0);
} else {
@@ -268,11 +268,11 @@ GNECalibrator::drawGL(const GUIVisualizationSettings& s) const {
const auto d = s.getDetailLevel(exaggeration);
// draw first calibrator symbols
drawCalibratorSymbol(s, d, exaggeration, myAdditionalGeometry.getShape().front(),
myAdditionalGeometry.getShapeRotations().front() + 90, -1);
myAdditionalGeometry.getShapeRotations().front() + 90, -1);
// draw rest of calibrator symbols
for (int i = 0; i < (int)myEdgeCalibratorGeometries.size(); i++) {
drawCalibratorSymbol(s, d, exaggeration, myEdgeCalibratorGeometries.at(i).getShape().front(),
myEdgeCalibratorGeometries.at(i).getShapeRotations().front() + 90, i);
myEdgeCalibratorGeometries.at(i).getShapeRotations().front() + 90, i);
}
// draw additional ID
drawAdditionalID(s);
@@ -295,7 +295,7 @@ GNECalibrator::checkDrawMoveContour() const {
// get edit modes
const auto& editModes = myNet->getViewNet()->getEditModes();
// check if we're in move mode
if (!myNet->getViewNet()->isMovingElement() && editModes.isCurrentSupermodeNetwork() &&
if (!myNet->getViewNet()->isCurrentlyMovingElements() && editModes.isCurrentSupermodeNetwork() &&
(editModes.networkEditMode == NetworkEditMode::NETWORK_MOVE) && myNet->getViewNet()->checkOverLockedElement(this, mySelected)) {
// only move the first element
return myNet->getViewNet()->getViewObjectsSelector().getGUIGlObjectFront() == this;
@@ -528,7 +528,7 @@ GNECalibrator::drawCalibratorSymbol(const GUIVisualizationSettings& s, const GUI
s.additionalSettings.calibratorHeight * 0.5, 0, s.additionalSettings.calibratorHeight * 0.5, rot, exaggeration);
} else if (symbolIndex < (int)myCalibratorContours->size()) {
myCalibratorContours->at(symbolIndex)->calculateContourRectangleShape(s, d, this, pos, s.additionalSettings.calibratorWidth,
s.additionalSettings.calibratorHeight * 0.5, 0, s.additionalSettings.calibratorHeight * 0.5, rot, exaggeration);
s.additionalSettings.calibratorHeight * 0.5, 0, s.additionalSettings.calibratorHeight * 0.5, rot, exaggeration);
}
}

2 changes: 1 addition & 1 deletion src/netedit/elements/additional/GNEDetector.cpp
Original file line number Diff line number Diff line change
@@ -90,7 +90,7 @@ GNEDetector::checkDrawMoveContour() const {
// get edit modes
const auto& editModes = myNet->getViewNet()->getEditModes();
// check if we're in move mode
if (!myNet->getViewNet()->isMovingElement() && editModes.isCurrentSupermodeNetwork() &&
if (!myNet->getViewNet()->isCurrentlyMovingElements() && editModes.isCurrentSupermodeNetwork() &&
(editModes.networkEditMode == NetworkEditMode::NETWORK_MOVE) && myNet->getViewNet()->checkOverLockedElement(this, mySelected)) {
// only move the first element
return myNet->getViewNet()->getViewObjectsSelector().getGUIGlObjectFront() == this;
4 changes: 2 additions & 2 deletions src/netedit/elements/additional/GNEMultiEntryExitDetector.cpp
Original file line number Diff line number Diff line change
@@ -140,7 +140,7 @@ GNEMultiEntryExitDetector::checkDrawMoveContour() const {
// get edit modes
const auto& editModes = myNet->getViewNet()->getEditModes();
// check if we're in move mode
if (!myNet->getViewNet()->isMovingElement() && editModes.isCurrentSupermodeNetwork() &&
if (!myNet->getViewNet()->isCurrentlyMovingElements() && editModes.isCurrentSupermodeNetwork() &&
(editModes.networkEditMode == NetworkEditMode::NETWORK_MOVE) && myNet->getViewNet()->checkOverLockedElement(this, mySelected)) {
// only move the first element
return myNet->getViewNet()->getViewObjectsSelector().getGUIGlObjectFront() == this;
@@ -198,7 +198,7 @@ void
GNEMultiEntryExitDetector::drawGL(const GUIVisualizationSettings& s) const {
// first check if additional has to be drawn
if (myNet->getViewNet()->getDataViewOptions().showAdditionals() &&
!myNet->getViewNet()->selectingDetectorsTLSMode()) {
!myNet->getViewNet()->selectingDetectorsTLSMode()) {
// draw parent and child lines
drawParentChildLines(s, s.additionalSettings.connectionColor);
// draw E3
6 changes: 3 additions & 3 deletions src/netedit/elements/additional/GNEPOI.cpp
Original file line number Diff line number Diff line change
@@ -304,7 +304,7 @@ GNEPOI::checkDrawMoveContour() const {
// get edit modes
const auto& editModes = myNet->getViewNet()->getEditModes();
// check if we're in move mode
if (!myNet->getViewNet()->isMovingElement() && editModes.isCurrentSupermodeNetwork() &&
if (!myNet->getViewNet()->isCurrentlyMovingElements() && editModes.isCurrentSupermodeNetwork() &&
(editModes.networkEditMode == NetworkEditMode::NETWORK_MOVE) && myNet->getViewNet()->checkOverLockedElement(this, mySelected)) {
// only move the first element
return myNet->getViewNet()->getViewObjectsSelector().getGUIGlObjectFront() == this;
@@ -354,8 +354,8 @@ GNEPOI::getPopUpMenu(GUIMainWindow& app, GUISUMOAbstractView& parent) {
void
GNEPOI::drawGL(const GUIVisualizationSettings& s) const {
// first check if POI can be drawn
if (myNet->getViewNet()->getDemandViewOptions().showShapes() &&
myNet->getViewNet()->getDataViewOptions().showShapes()) {
if (myNet->getViewNet()->getDemandViewOptions().showShapes() &&
myNet->getViewNet()->getDataViewOptions().showShapes()) {
// draw boundaries
GLHelper::drawBoundary(s, getCenteringBoundary());
// obtain POIExaggeration
2 changes: 1 addition & 1 deletion src/netedit/elements/additional/GNEParkingSpace.cpp
Original file line number Diff line number Diff line change
@@ -138,7 +138,7 @@ GNEParkingSpace::checkDrawMoveContour() const {
// get edit modes
const auto& editModes = myNet->getViewNet()->getEditModes();
// check if we're in move mode
if (!myNet->getViewNet()->isMovingElement() && editModes.isCurrentSupermodeNetwork() &&
if (!myNet->getViewNet()->isCurrentlyMovingElements() && editModes.isCurrentSupermodeNetwork() &&
(editModes.networkEditMode == NetworkEditMode::NETWORK_MOVE) && myNet->getViewNet()->checkOverLockedElement(this, mySelected)) {
// only move the first element
return myNet->getViewNet()->getViewObjectsSelector().getGUIGlObjectFront() == this;
6 changes: 3 additions & 3 deletions src/netedit/elements/additional/GNEPoly.cpp
Original file line number Diff line number Diff line change
@@ -233,7 +233,7 @@ GNEPoly::checkDrawMoveContour() const {
// get edit modes
const auto& editModes = myNet->getViewNet()->getEditModes();
// check if we're in move mode
if (!myNet->getViewNet()->isMovingElement() && editModes.isCurrentSupermodeNetwork() &&
if (!myNet->getViewNet()->isCurrentlyMovingElements() && editModes.isCurrentSupermodeNetwork() &&
(editModes.networkEditMode == NetworkEditMode::NETWORK_MOVE) && myNet->getViewNet()->checkOverLockedElement(this, mySelected)) {
// only move the first element
return myNet->getViewNet()->getViewObjectsSelector().getGUIGlObjectFront() == this;
@@ -302,8 +302,8 @@ void
GNEPoly::drawGL(const GUIVisualizationSettings& s) const {
// first check if poly can be drawn
if (myNet->getViewNet()->getDemandViewOptions().showShapes() &&
myNet->getViewNet()->getDataViewOptions().showShapes() &&
GUIPolygon::checkDraw(s, this, this)) {
myNet->getViewNet()->getDataViewOptions().showShapes() &&
GUIPolygon::checkDraw(s, this, this)) {
// draw boundary
const auto boundary = getCenteringBoundary();
GLHelper::drawBoundary(s, getCenteringBoundary());
2 changes: 1 addition & 1 deletion src/netedit/elements/additional/GNERerouter.cpp
Original file line number Diff line number Diff line change
@@ -128,7 +128,7 @@ GNERerouter::checkDrawMoveContour() const {
// get edit modes
const auto& editModes = myNet->getViewNet()->getEditModes();
// check if we're in move mode
if (!myNet->getViewNet()->isMovingElement() && editModes.isCurrentSupermodeNetwork() &&
if (!myNet->getViewNet()->isCurrentlyMovingElements() && editModes.isCurrentSupermodeNetwork() &&
(editModes.networkEditMode == NetworkEditMode::NETWORK_MOVE) && myNet->getViewNet()->checkOverLockedElement(this, mySelected)) {
// only move the first element
return myNet->getViewNet()->getViewObjectsSelector().getGUIGlObjectFront() == this;
2 changes: 1 addition & 1 deletion src/netedit/elements/additional/GNERerouterSymbol.cpp
Original file line number Diff line number Diff line change
@@ -86,7 +86,7 @@ GNERerouterSymbol::checkDrawMoveContour() const {
// get edit modes
const auto& editModes = myNet->getViewNet()->getEditModes();
// check if we're in move mode
if (!myNet->getViewNet()->isMovingElement() && editModes.isCurrentSupermodeNetwork() &&
if (!myNet->getViewNet()->isCurrentlyMovingElements() && editModes.isCurrentSupermodeNetwork() &&
(editModes.networkEditMode == NetworkEditMode::NETWORK_MOVE) && myNet->getViewNet()->checkOverLockedElement(this, mySelected)) {
// only move the first element
return myNet->getViewNet()->getViewObjectsSelector().getGUIGlObjectFront() == this;
2 changes: 1 addition & 1 deletion src/netedit/elements/additional/GNEStoppingPlace.cpp
Original file line number Diff line number Diff line change
@@ -158,7 +158,7 @@ GNEStoppingPlace::checkDrawMoveContour() const {
// get edit modes
const auto& editModes = myNet->getViewNet()->getEditModes();
// check if we're in move mode
if (!myNet->getViewNet()->isMovingElement() && editModes.isCurrentSupermodeNetwork() &&
if (!myNet->getViewNet()->isCurrentlyMovingElements() && editModes.isCurrentSupermodeNetwork() &&
(editModes.networkEditMode == NetworkEditMode::NETWORK_MOVE) && myNet->getViewNet()->checkOverLockedElement(this, mySelected)) {
// only move the first element
return myNet->getViewNet()->getViewObjectsSelector().getGUIGlObjectFront() == this;
2 changes: 1 addition & 1 deletion src/netedit/elements/additional/GNETAZ.cpp
Original file line number Diff line number Diff line change
@@ -205,7 +205,7 @@ GNETAZ::checkDrawMoveContour() const {
// get edit modes
const auto& editModes = myNet->getViewNet()->getEditModes();
// check if we're in move mode
if (!myNet->getViewNet()->isMovingElement() && editModes.isCurrentSupermodeNetwork() &&
if (!myNet->getViewNet()->isCurrentlyMovingElements() && editModes.isCurrentSupermodeNetwork() &&
(editModes.networkEditMode == NetworkEditMode::NETWORK_MOVE) && myNet->getViewNet()->checkOverLockedElement(this, mySelected)) {
// only move the first element
return myNet->getViewNet()->getViewObjectsSelector().getGUIGlObjectFront() == this;
2 changes: 1 addition & 1 deletion src/netedit/elements/additional/GNETractionSubstation.cpp
Original file line number Diff line number Diff line change
@@ -96,7 +96,7 @@ GNETractionSubstation::checkDrawMoveContour() const {
// get edit modes
const auto& editModes = myNet->getViewNet()->getEditModes();
// check if we're in move mode
if (!myNet->getViewNet()->isMovingElement() && editModes.isCurrentSupermodeNetwork() &&
if (!myNet->getViewNet()->isCurrentlyMovingElements() && editModes.isCurrentSupermodeNetwork() &&
(editModes.networkEditMode == NetworkEditMode::NETWORK_MOVE) && myNet->getViewNet()->checkOverLockedElement(this, mySelected)) {
// only move the first element
return myNet->getViewNet()->getViewObjectsSelector().getGUIGlObjectFront() == this;
2 changes: 1 addition & 1 deletion src/netedit/elements/additional/GNEVariableSpeedSign.cpp
Original file line number Diff line number Diff line change
@@ -161,7 +161,7 @@ GNEVariableSpeedSign::checkDrawMoveContour() const {
// get edit modes
const auto& editModes = myNet->getViewNet()->getEditModes();
// check if we're in move mode
if (!myNet->getViewNet()->isMovingElement() && editModes.isCurrentSupermodeNetwork() &&
if (!myNet->getViewNet()->isCurrentlyMovingElements() && editModes.isCurrentSupermodeNetwork() &&
(editModes.networkEditMode == NetworkEditMode::NETWORK_MOVE) && myNet->getViewNet()->checkOverLockedElement(this, mySelected)) {
// only move the first element
return myNet->getViewNet()->getViewObjectsSelector().getGUIGlObjectFront() == this;
2 changes: 1 addition & 1 deletion src/netedit/elements/demand/GNEDemandElement.cpp
Original file line number Diff line number Diff line change
@@ -241,7 +241,7 @@ GNEDemandElement::checkDrawMoveContour() const {
// get edit modes
const auto& editModes = myNet->getViewNet()->getEditModes();
// check if we're in select mode
if (!myNet->getViewNet()->isMovingElement() && editModes.isCurrentSupermodeDemand() &&
if (!myNet->getViewNet()->isCurrentlyMovingElements() && editModes.isCurrentSupermodeDemand() &&
(editModes.demandEditMode == DemandEditMode::DEMAND_MOVE) && myNet->getViewNet()->checkOverLockedElement(this, mySelected)) {
// only move the first element
return myNet->getViewNet()->getViewObjectsSelector().getGUIGlObjectFront() == this;
2 changes: 1 addition & 1 deletion src/netedit/elements/network/GNEConnection.cpp
Original file line number Diff line number Diff line change
@@ -204,7 +204,7 @@ GNEConnection::checkDrawMoveContour() const {
// get edit modes
const auto& editModes = myNet->getViewNet()->getEditModes();
// check if we're in move mode
if (!myNet->getViewNet()->isMovingElement() && editModes.isCurrentSupermodeNetwork() &&
if (!myNet->getViewNet()->isCurrentlyMovingElements() && editModes.isCurrentSupermodeNetwork() &&
(editModes.networkEditMode == NetworkEditMode::NETWORK_MOVE) && myNet->getViewNet()->checkOverLockedElement(this, mySelected)) {
// only move the first element
return myNet->getViewNet()->getViewObjectsSelector().getGUIGlObjectFront() == this;
2 changes: 1 addition & 1 deletion src/netedit/elements/network/GNECrossing.cpp
Original file line number Diff line number Diff line change
@@ -152,7 +152,7 @@ GNECrossing::checkDrawMoveContour() const {
// get edit modes
const auto& editModes = myNet->getViewNet()->getEditModes();
// check if we're in move mode
if (!myNet->getViewNet()->isMovingElement() && editModes.isCurrentSupermodeNetwork() &&
if (!myNet->getViewNet()->isCurrentlyMovingElements() && editModes.isCurrentSupermodeNetwork() &&
(editModes.networkEditMode == NetworkEditMode::NETWORK_MOVE) && myNet->getViewNet()->checkOverLockedElement(this, mySelected)) {
// only move the first element
return myNet->getViewNet()->getViewObjectsSelector().getGUIGlObjectFront() == this;
2 changes: 1 addition & 1 deletion src/netedit/elements/network/GNEEdge.cpp
Original file line number Diff line number Diff line change
@@ -360,7 +360,7 @@ GNEEdge::checkDrawMoveContour() const {
// get edit modes
const auto& editModes = myNet->getViewNet()->getEditModes();
// check if we're in move mode
if (!myNet->getViewNet()->isMovingElement() && editModes.isCurrentSupermodeNetwork() &&
if (!myNet->getViewNet()->isCurrentlyMovingElements() && editModes.isCurrentSupermodeNetwork() &&
(editModes.networkEditMode == NetworkEditMode::NETWORK_MOVE)) {
// check lanes
for (const auto& lane : myLanes) {
16 changes: 8 additions & 8 deletions src/netedit/elements/network/GNEJunction.cpp
Original file line number Diff line number Diff line change
@@ -327,7 +327,7 @@ GNEJunction::checkDrawMoveContour() const {
// get edit modes
const auto& editModes = myNet->getViewNet()->getEditModes();
// check if we're in move mode
if (!myNet->getViewNet()->isMovingElement() && editModes.isCurrentSupermodeNetwork() &&
if (!myNet->getViewNet()->isCurrentlyMovingElements() && editModes.isCurrentSupermodeNetwork() &&
(editModes.networkEditMode == NetworkEditMode::NETWORK_MOVE) && myNet->getViewNet()->checkOverLockedElement(this, mySelected)) {
// only move the first element
return myNet->getViewNet()->getViewObjectsSelector().getGUIGlObjectFront() == this;
@@ -1616,20 +1616,20 @@ GNEJunction::setResponsible(bool newVal) {

bool
GNEJunction::drawAsBubble(const GUIVisualizationSettings& s, const double junctionShapeArea) const {
const auto &editModes = myNet->getViewNet()->getEditModes();
const auto& editModes = myNet->getViewNet()->getEditModes();
// check conditions
if (junctionShapeArea < 4) {
// force draw if this junction is a candidate
if (mySourceCandidate || myTargetCandidate || mySpecialCandidate ||
myPossibleCandidate || myConflictedCandidate) {
myPossibleCandidate || myConflictedCandidate) {
return true;
}
// force draw if we're in person/container plan mode
if (editModes.isCurrentSupermodeDemand() &&
((editModes.demandEditMode == DemandEditMode::DEMAND_PERSON) ||
(editModes.demandEditMode == DemandEditMode::DEMAND_PERSONPLAN) ||
(editModes.demandEditMode == DemandEditMode::DEMAND_CONTAINER) ||
(editModes.demandEditMode == DemandEditMode::DEMAND_CONTAINERPLAN))) {
if (editModes.isCurrentSupermodeDemand() &&
((editModes.demandEditMode == DemandEditMode::DEMAND_PERSON) ||
(editModes.demandEditMode == DemandEditMode::DEMAND_PERSONPLAN) ||
(editModes.demandEditMode == DemandEditMode::DEMAND_CONTAINER) ||
(editModes.demandEditMode == DemandEditMode::DEMAND_CONTAINERPLAN))) {
return true;
}
}
2 changes: 1 addition & 1 deletion src/netedit/elements/network/GNELane.cpp
Original file line number Diff line number Diff line change
@@ -428,7 +428,7 @@ GNELane::checkDrawSelectContour() const {
bool
GNELane::checkDrawMoveContour() const {
// only move if shape is being edited
if (myShapeEdited && !myNet->getViewNet()->isMovingElement()) {
if (myShapeEdited && !myNet->getViewNet()->isCurrentlyMovingElements()) {
return myNet->getViewNet()->getViewObjectsSelector().getGUIGlObjectFront() == this;
} else {
return false;

0 comments on commit 581767e

Please sign in to comment.