Eclipse SUMO - Simulation of Urban MObility
|
#include <GUIViewObjectsHandler.h>
Data Structures | |
struct | ObjectContainer |
object container More... | |
Public Types | |
typedef std::map< double, std::vector< ObjectContainer > > | GLObjectsSortedContainer |
typedef for pack elements sorted by layer | |
Public Member Functions | |
GUIViewObjectsHandler () | |
constructor | |
void | isolateEdgeGeometryPoints () |
isolate edge geometry points (used for moving) | |
void | reset () |
reset view objects handler | |
void | updateFrontObject (const GUIGlObject *GLObject) |
move the given object to the front (currently used only in netedit) | |
position and boundary functions. used for defining the posion that will be check (usually the mouse position) | |
get selection position | |
const Position & | getSelectionPosition () const |
const Boundary & | getSelectionBoundary () const |
get selection boundary | |
void | setSelectionPosition (const Position &pos) |
set selection position | |
void | setSelectionBoundary (const Boundary &boundary) |
set selection boundary | |
check functions. If the result is positive, the given GLObject will be added to elementUnderCursor | |
check boundary parent element | |
bool | checkBoundaryParentObject (const GUIGlObject *GLObject, const double layer, const GUIGlObject *parent) |
bool | checkCircleObject (const GUIVisualizationSettings::Detail d, const GUIGlObject *GLObject, const Position ¢er, const double radius, const Boundary &circleBoundary, const double layer) |
check if mouse is within elements geometry (for circles) | |
bool | checkGeometryPoint (const GUIVisualizationSettings::Detail d, const GUIGlObject *GLObject, const PositionVector &shape, const int index, const double layer, const double radius) |
check if mouse is within geometry point | |
bool | checkPositionOverShape (const GUIVisualizationSettings::Detail d, const GUIGlObject *GLObject, const PositionVector &shape, const double layer, const double distance) |
check if mouse is within geometry point | |
bool | checkShapeObject (const GUIGlObject *GLObject, const PositionVector &shape, const Boundary &shapeBoundary, const double layer, const GNESegment *segment) |
check (closed) shape element | |
functions used for mark (select) elements | |
add element into list of elements under cursor | |
bool | selectObject (const GUIGlObject *GLObject, const double layer, const bool checkDuplicated, const bool fullBoundary, const GNESegment *segment) |
bool | selectGeometryPoint (const GUIGlObject *GLObject, const int newIndex, const double layer) |
add geometryPoint into list of elements under cursor | |
bool | selectPositionOverShape (const GUIGlObject *GLObject, const Position &pos, const double layer, const double offset) |
select position over shape (for example, the position over a lane shape) | |
bool | isObjectSelected (const GUIGlObject *GLObject) const |
check if element was already selected | |
bool | checkRectangleSelection (const GUIVisualizationSettings &s, const GUIGlObject *GLObject, const double layer, const GUIGlObject *parent) |
check rectangle selection | |
const GLObjectsSortedContainer & | getSelectedObjects () const |
get all elements under cursor sorted by layer | |
const GNESegment * | getSelectedSegment (const GUIGlObject *GLObject) const |
get segment associated with the given GLObject (if exist) | |
const std::vector< int > & | getSelectedGeometryPoints (const GUIGlObject *GLObject) const |
get geometry points for the given glObject | |
const Position & | getSelectedPositionOverShape (const GUIGlObject *GLObject) const |
get position over shape | |
int | getNumberOfSelectedObjects () const |
get number of selected objects | |
functions related with redrawing path elements | |
get redrawing objects | |
const std::set< const GNEPathElement * > & | getRedrawPathElements () const |
bool | isPathElementMarkForRedraw (const GNEPathElement *pathElement) const |
check if the given path element has to be redraw again | |
void | addToRedrawPathElements (const GNEPathElement *pathElement) |
add path element to redrawing set | |
functions related with merging junctions | |
get merging junctions | |
const std::vector< const GNEJunction * > & | getMergingJunctions () const |
bool | addMergingJunctions (const GNEJunction *junction) |
add to merging junctions (used for marking junctions to merge) | |
Data Fields | |
const GNEEdge * | markedEdge = nullptr |
marked edge (used in create edge mode, for splitting) | |
const GUIGlObject * | markedFirstGeometryPoint = nullptr |
marked first geometry point (used for moving/delete geometry points) | |
const GNELane * | markedLane = nullptr |
marked lane (used in create edge mode, for splitting) | |
const GNERoute * | markedRoute = nullptr |
marked route (used in create vehicle mode) | |
const GUIGlObject * | markedSecondGeometryPoint = nullptr |
marked first geometry point (used for moving/delete geometry points) | |
const GUIGlObject * | markedTAZ = nullptr |
marked TAZ (used in create TAZRel mode) | |
GUIGlObjectType | recomputeBoundaries = GLO_NETWORK |
recompute boundaries | |
Protected Attributes | |
std::vector< int > | myEmptyGeometryPoints |
empty geometry points | |
std::vector< const GNEJunction * > | myMergingJunctions |
merging junctions | |
int | myNumberOfSelectedObjects = 0 |
number of selected objects | |
std::set< const GNEPathElement * > | myRedrawPathElements |
set with path elements marked for redrawing | |
std::unordered_map< const GUIGlObject *, std::pair< bool, const GNESegment * > > | mySelectedObjects |
map with selected elements and if was selected with full boundary (used only to avoid double selections) | |
Boundary | mySelectionBoundary |
selection boundary | |
PositionVector | mySelectionBoundaryShape |
selection boundary (shape) | |
Position | mySelectionPosition |
position | |
GLObjectsSortedContainer | mySortedSelectedObjects |
selected element sorted by layer | |
Private Member Functions | |
GUIViewObjectsHandler (const GUIViewObjectsHandler &)=default | |
set copy constructor private | |
GUIViewObjectsHandler & | operator= (const GUIViewObjectsHandler &)=default |
set assignment operator private | |
Definition at line 43 of file GUIViewObjectsHandler.h.
typedef std::map<double, std::vector<ObjectContainer> > GUIViewObjectsHandler::GLObjectsSortedContainer |
typedef for pack elements sorted by layer
Definition at line 67 of file GUIViewObjectsHandler.h.
GUIViewObjectsHandler::GUIViewObjectsHandler | ( | ) |
constructor
Definition at line 32 of file GUIViewObjectsHandler.cpp.
|
privatedefault |
set copy constructor private
bool GUIViewObjectsHandler::addMergingJunctions | ( | const GNEJunction * | junction | ) |
add to merging junctions (used for marking junctions to merge)
Definition at line 438 of file GUIViewObjectsHandler.cpp.
References myMergingJunctions.
Referenced by GNEJunction::checkDrawToContour().
void GUIViewObjectsHandler::addToRedrawPathElements | ( | const GNEPathElement * | pathElement | ) |
add path element to redrawing set
Definition at line 426 of file GUIViewObjectsHandler.cpp.
References myRedrawPathElements.
Referenced by GNELaneAreaDetector::drawJunctionPartialGL(), GNEEdgeRelData::drawJunctionPartialGL(), GNERoute::drawJunctionPartialGL(), GNEVehicle::drawJunctionPartialGL(), GNELaneAreaDetector::drawLanePartialGL(), GNEEdgeRelData::drawLanePartialGL(), GNERoute::drawLanePartialGL(), GNEVehicle::drawLanePartialGL(), GNEDemandElementPlan::drawPlanJunctionPartial(), GNEDemandElementPlan::drawPlanLanePartial(), and GNEViewNet::redrawPathElementContours().
bool GUIViewObjectsHandler::checkBoundaryParentObject | ( | const GUIGlObject * | GLObject, |
const double | layer, | ||
const GUIGlObject * | parent | ||
) |
Definition at line 88 of file GUIViewObjectsHandler.cpp.
References Boundary::isInitialised(), isObjectSelected(), mySelectedObjects, mySelectionBoundary, and selectObject().
Referenced by GNEConnection::calculateConnectionContour(), GNECrossing::calculateCrossingContour(), GNELane::calculateLaneContour(), and checkRectangleSelection().
bool GUIViewObjectsHandler::checkCircleObject | ( | const GUIVisualizationSettings::Detail | d, |
const GUIGlObject * | GLObject, | ||
const Position & | center, | ||
const double | radius, | ||
const Boundary & | circleBoundary, | ||
const double | layer | ||
) |
check if mouse is within elements geometry (for circles)
Definition at line 107 of file GUIViewObjectsHandler.cpp.
References Boundary::around2D(), Boundary::contains2D(), Position::distanceSquaredTo2D(), GUIGlObject::getCenteringBoundary(), Position::INVALID, Boundary::isInitialised(), isObjectSelected(), mySelectionBoundary, mySelectionBoundaryShape, mySelectionPosition, Boundary::overlapsWith(), GUIVisualizationSettings::PreciseSelection, and selectObject().
Referenced by GNEContour::calculateContourCircleShape().
bool GUIViewObjectsHandler::checkGeometryPoint | ( | const GUIVisualizationSettings::Detail | d, |
const GUIGlObject * | GLObject, | ||
const PositionVector & | shape, | ||
const int | index, | ||
const double | layer, | ||
const double | radius | ||
) |
check if mouse is within geometry point
Definition at line 162 of file GUIViewObjectsHandler.cpp.
References Boundary::add(), Boundary::around2D(), Boundary::contains2D(), Position::distanceSquaredTo2D(), Boundary::grow(), Position::INVALID, Boundary::isInitialised(), mySelectionBoundary, mySelectionBoundaryShape, mySelectionPosition, Boundary::overlapsWith(), GUIVisualizationSettings::PreciseSelection, and selectGeometryPoint().
Referenced by GNEContour::calculateContourAllGeometryPoints(), GNEContour::calculateContourEdgeGeometryPoints(), GNEContour::calculateContourFirstGeometryPoint(), GNEContour::calculateContourLastGeometryPoint(), and GNEContour::calculateContourMiddleGeometryPoints().
bool GUIViewObjectsHandler::checkPositionOverShape | ( | const GUIVisualizationSettings::Detail | d, |
const GUIGlObject * | GLObject, | ||
const PositionVector & | shape, | ||
const double | layer, | ||
const double | distance | ||
) |
check if mouse is within geometry point
Definition at line 213 of file GUIViewObjectsHandler.cpp.
References Position::distanceSquaredTo2D(), Position::INVALID, mySelectionPosition, PositionVector::nearest_offset_to_point2D(), PositionVector::positionAtOffset2D(), GUIVisualizationSettings::PreciseSelection, and selectPositionOverShape().
Referenced by GNEContour::calculateContourAllGeometryPoints(), and GNEContour::calculateContourMiddleGeometryPoints().
bool GUIViewObjectsHandler::checkRectangleSelection | ( | const GUIVisualizationSettings & | s, |
const GUIGlObject * | GLObject, | ||
const double | layer, | ||
const GUIGlObject * | parent | ||
) |
check rectangle selection
Definition at line 348 of file GUIViewObjectsHandler.cpp.
References checkBoundaryParentObject(), and GUIVisualizationSettings::drawForRectangleSelection.
Referenced by GNEContour::calculateContourCircleShape(), GNEContour::calculateContourClosedShape(), GNEContour::calculateContourExtrudedShape(), and GNEContour::calculateContourRectangleShape().
bool GUIViewObjectsHandler::checkShapeObject | ( | const GUIGlObject * | GLObject, |
const PositionVector & | shape, | ||
const Boundary & | shapeBoundary, | ||
const double | layer, | ||
const GNESegment * | segment | ||
) |
check (closed) shape element
Definition at line 233 of file GUIViewObjectsHandler.cpp.
References PositionVector::around(), Boundary::contains2D(), Boundary::crosses(), Position::INVALID, Boundary::isInitialised(), isObjectSelected(), mySelectionBoundary, mySelectionPosition, and selectObject().
Referenced by GNEContour::calculateContourClosedShape(), GNEContour::calculateContourEdge(), GNEContour::calculateContourExtrudedShape(), and GNEContour::calculateContourRectangleShape().
const std::vector< const GNEJunction * > & GUIViewObjectsHandler::getMergingJunctions | ( | ) | const |
Definition at line 432 of file GUIViewObjectsHandler.cpp.
References myMergingJunctions.
Referenced by GNEViewNet::checkMergeJunctions().
int GUIViewObjectsHandler::getNumberOfSelectedObjects | ( | ) | const |
get number of selected objects
Definition at line 404 of file GUIViewObjectsHandler.cpp.
References myNumberOfSelectedObjects.
Referenced by GNEViewNetHelper::ViewObjectsSelector::updateObjects().
const std::set< const GNEPathElement * > & GUIViewObjectsHandler::getRedrawPathElements | ( | ) | const |
Definition at line 410 of file GUIViewObjectsHandler.cpp.
References myRedrawPathElements.
Referenced by GNEPathManager::redrawPathElements().
const std::vector< int > & GUIViewObjectsHandler::getSelectedGeometryPoints | ( | const GUIGlObject * | GLObject | ) | const |
get geometry points for the given glObject
Definition at line 376 of file GUIViewObjectsHandler.cpp.
References myEmptyGeometryPoints, and mySortedSelectedObjects.
Referenced by GNEContour::calculateContourEdgeGeometryPoints(), GNEMoveElement::calculateMoveShapeOperation(), GNEContour::drawDottedContourGeometryPoints(), GNEEdge::drawEndGeometryPoint(), GNEEdge::drawStartGeometryPoint(), and GNEStoppingPlace::getMoveOperation().
const GUIViewObjectsHandler::GLObjectsSortedContainer & GUIViewObjectsHandler::getSelectedObjects | ( | ) | const |
get all elements under cursor sorted by layer
Definition at line 359 of file GUIViewObjectsHandler.cpp.
References mySortedSelectedObjects.
Referenced by GNEViewNet::getAdditionalAtPopupPosition(), GNEViewNet::getConnectionAtPopupPosition(), GNEViewNet::getCrossingAtPopupPosition(), GNEViewNet::getDemandElementAtPopupPosition(), GNEViewNet::getEdgeAtPopupPosition(), GNEViewNet::getJunctionAtPopupPosition(), GNEViewNet::getLaneAtPopupPosition(), GNEViewNet::getPOIAtPopupPosition(), GNEViewNet::getPolygonAtPopupPosition(), GNEViewNet::getShapeEditedAtPopupPosition(), GNEViewNet::getTAZAtPopupPosition(), GNEViewNet::getWalkingAreaAtPopupPosition(), and GNEViewNetHelper::ViewObjectsSelector::updateObjects().
const Position & GUIViewObjectsHandler::getSelectedPositionOverShape | ( | const GUIGlObject * | GLObject | ) | const |
get position over shape
Definition at line 390 of file GUIViewObjectsHandler.cpp.
References Position::INVALID, and mySortedSelectedObjects.
Referenced by GNEMoveElement::calculateMoveShapeOperation(), and GNEContour::drawDottedContourGeometryPoints().
const GNESegment * GUIViewObjectsHandler::getSelectedSegment | ( | const GUIGlObject * | GLObject | ) | const |
get segment associated with the given GLObject (if exist)
Definition at line 365 of file GUIViewObjectsHandler.cpp.
References mySelectedObjects.
Referenced by GNEDetector::checkDrawMoveContour(), and GNEAdditional::getMoveOperationMultiLane().
const Boundary & GUIViewObjectsHandler::getSelectionBoundary | ( | ) | const |
get selection boundary
Definition at line 62 of file GUIViewObjectsHandler.cpp.
References mySelectionBoundary.
Referenced by GNEEdge::calculateEdgeContour(), GNEJunction::calculateJunctioncontour(), and GNENetworkElement::checkDrawingBoundarySelection().
const Position & GUIViewObjectsHandler::getSelectionPosition | ( | ) | const |
Definition at line 56 of file GUIViewObjectsHandler.cpp.
References mySelectionPosition.
Referenced by GNEContour::calculateContourEdgeGeometryPoints().
bool GUIViewObjectsHandler::isObjectSelected | ( | const GUIGlObject * | GLObject | ) | const |
check if element was already selected
Definition at line 342 of file GUIViewObjectsHandler.cpp.
References mySelectedObjects.
Referenced by checkBoundaryParentObject(), checkCircleObject(), GNENetworkElement::checkDrawingBoundarySelection(), checkShapeObject(), GNEDemandElementPlan::drawPlanGL(), GNEDemandElementPlan::drawPlanJunctionPartial(), GNEDemandElementPlan::drawPlanLanePartial(), and selectObject().
void GUIViewObjectsHandler::isolateEdgeGeometryPoints | ( | ) |
isolate edge geometry points (used for moving)
Definition at line 476 of file GUIViewObjectsHandler.cpp.
References GLO_EDGE, GLO_FRONTELEMENT, mySortedSelectedObjects, and GUIViewObjectsHandler::ObjectContainer::object.
Referenced by GNEViewNet::updateObjectsInPosition().
bool GUIViewObjectsHandler::isPathElementMarkForRedraw | ( | const GNEPathElement * | pathElement | ) | const |
check if the given path element has to be redraw again
Definition at line 416 of file GUIViewObjectsHandler.cpp.
References myRedrawPathElements.
Referenced by GNELaneAreaDetector::drawJunctionPartialGL(), GNEEdgeRelData::drawJunctionPartialGL(), GNERoute::drawJunctionPartialGL(), GNEVehicle::drawJunctionPartialGL(), GNEPathManager::drawJunctionPathElements(), GNELaneAreaDetector::drawLanePartialGL(), GNEEdgeRelData::drawLanePartialGL(), GNERoute::drawLanePartialGL(), GNEVehicle::drawLanePartialGL(), GNEPathManager::drawLanePathElements(), GNEDemandElementPlan::drawPlanJunctionPartial(), and GNEDemandElementPlan::drawPlanLanePartial().
|
privatedefault |
set assignment operator private
void GUIViewObjectsHandler::reset | ( | ) |
reset view objects handler
Definition at line 36 of file GUIViewObjectsHandler.cpp.
References GLO_NETWORK, markedEdge, markedFirstGeometryPoint, markedLane, markedRoute, markedSecondGeometryPoint, markedTAZ, myMergingJunctions, myNumberOfSelectedObjects, myRedrawPathElements, mySelectedObjects, mySortedSelectedObjects, and recomputeBoundaries.
Referenced by GNEViewNet::updateObjectsInBoundary(), and GNEViewNet::updateObjectsInPosition().
bool GUIViewObjectsHandler::selectGeometryPoint | ( | const GUIGlObject * | GLObject, |
const int | newIndex, | ||
const double | layer | ||
) |
add geometryPoint into list of elements under cursor
Definition at line 285 of file GUIViewObjectsHandler.cpp.
References myNumberOfSelectedObjects, mySelectedObjects, and mySortedSelectedObjects.
Referenced by checkGeometryPoint().
bool GUIViewObjectsHandler::selectObject | ( | const GUIGlObject * | GLObject, |
const double | layer, | ||
const bool | checkDuplicated, | ||
const bool | fullBoundary, | ||
const GNESegment * | segment | ||
) |
Definition at line 269 of file GUIViewObjectsHandler.cpp.
References isObjectSelected(), myNumberOfSelectedObjects, mySelectedObjects, and mySortedSelectedObjects.
Referenced by GNEEdge::calculateEdgeContour(), GNEJunction::calculateJunctioncontour(), checkBoundaryParentObject(), checkCircleObject(), and checkShapeObject().
bool GUIViewObjectsHandler::selectPositionOverShape | ( | const GUIGlObject * | GLObject, |
const Position & | pos, | ||
const double | layer, | ||
const double | offset | ||
) |
select position over shape (for example, the position over a lane shape)
Definition at line 314 of file GUIViewObjectsHandler.cpp.
References Position::INVALID, myNumberOfSelectedObjects, mySelectedObjects, and mySortedSelectedObjects.
Referenced by GNEContour::calculateContourEdgeGeometryPoints(), and checkPositionOverShape().
void GUIViewObjectsHandler::setSelectionBoundary | ( | const Boundary & | boundary | ) |
set selection boundary
Definition at line 78 of file GUIViewObjectsHandler.cpp.
References Boundary::getShape(), Position::INVALID, mySelectionBoundary, mySelectionBoundaryShape, and mySelectionPosition.
Referenced by GNEViewNet::updateObjectsInBoundary().
void GUIViewObjectsHandler::setSelectionPosition | ( | const Position & | pos | ) |
set selection position
Definition at line 68 of file GUIViewObjectsHandler.cpp.
References mySelectionBoundary, mySelectionBoundaryShape, mySelectionPosition, and Boundary::reset().
Referenced by GNEViewNet::updateObjectsInPosition().
void GUIViewObjectsHandler::updateFrontObject | ( | const GUIGlObject * | GLObject | ) |
move the given object to the front (currently used only in netedit)
Definition at line 451 of file GUIViewObjectsHandler.cpp.
References GUIViewObjectsHandler::ObjectContainer::geometryPoints, GLO_FRONTELEMENT, mySortedSelectedObjects, and GUIViewObjectsHandler::ObjectContainer::object.
Referenced by GNEViewNet::updateObjectsInBoundary(), and GNEViewNet::updateObjectsInPosition().
const GNEEdge* GUIViewObjectsHandler::markedEdge = nullptr |
marked edge (used in create edge mode, for splitting)
Definition at line 183 of file GUIViewObjectsHandler.h.
Referenced by GNEViewNet::drawTemporalSplitJunction(), and reset().
const GUIGlObject* GUIViewObjectsHandler::markedFirstGeometryPoint = nullptr |
marked first geometry point (used for moving/delete geometry points)
Definition at line 195 of file GUIViewObjectsHandler.h.
Referenced by GNEEdge::drawEdgeShape(), and reset().
const GNELane* GUIViewObjectsHandler::markedLane = nullptr |
marked lane (used in create edge mode, for splitting)
Definition at line 186 of file GUIViewObjectsHandler.h.
Referenced by GNEViewNet::drawNeteditAttributesReferences(), and reset().
const GNERoute* GUIViewObjectsHandler::markedRoute = nullptr |
marked route (used in create vehicle mode)
Definition at line 192 of file GUIViewObjectsHandler.h.
Referenced by reset().
const GUIGlObject* GUIViewObjectsHandler::markedSecondGeometryPoint = nullptr |
marked first geometry point (used for moving/delete geometry points)
Definition at line 198 of file GUIViewObjectsHandler.h.
Referenced by reset().
const GUIGlObject* GUIViewObjectsHandler::markedTAZ = nullptr |
marked TAZ (used in create TAZRel mode)
Definition at line 189 of file GUIViewObjectsHandler.h.
Referenced by reset().
|
protected |
empty geometry points
Definition at line 223 of file GUIViewObjectsHandler.h.
Referenced by getSelectedGeometryPoints().
|
protected |
merging junctions
Definition at line 226 of file GUIViewObjectsHandler.h.
Referenced by addMergingJunctions(), getMergingJunctions(), and reset().
|
protected |
number of selected objects
Definition at line 208 of file GUIViewObjectsHandler.h.
Referenced by getNumberOfSelectedObjects(), reset(), selectGeometryPoint(), selectObject(), and selectPositionOverShape().
|
protected |
set with path elements marked for redrawing
Definition at line 211 of file GUIViewObjectsHandler.h.
Referenced by addToRedrawPathElements(), getRedrawPathElements(), isPathElementMarkForRedraw(), and reset().
|
protected |
map with selected elements and if was selected with full boundary (used only to avoid double selections)
Definition at line 205 of file GUIViewObjectsHandler.h.
Referenced by checkBoundaryParentObject(), getSelectedSegment(), isObjectSelected(), reset(), selectGeometryPoint(), selectObject(), and selectPositionOverShape().
|
protected |
selection boundary
Definition at line 214 of file GUIViewObjectsHandler.h.
Referenced by checkBoundaryParentObject(), checkCircleObject(), checkGeometryPoint(), checkShapeObject(), getSelectionBoundary(), setSelectionBoundary(), and setSelectionPosition().
|
protected |
selection boundary (shape)
Definition at line 217 of file GUIViewObjectsHandler.h.
Referenced by checkCircleObject(), checkGeometryPoint(), setSelectionBoundary(), and setSelectionPosition().
|
protected |
position
Definition at line 220 of file GUIViewObjectsHandler.h.
Referenced by checkCircleObject(), checkGeometryPoint(), checkPositionOverShape(), checkShapeObject(), getSelectionPosition(), setSelectionBoundary(), and setSelectionPosition().
|
protected |
selected element sorted by layer
Definition at line 202 of file GUIViewObjectsHandler.h.
Referenced by getSelectedGeometryPoints(), getSelectedObjects(), getSelectedPositionOverShape(), isolateEdgeGeometryPoints(), reset(), selectGeometryPoint(), selectObject(), selectPositionOverShape(), and updateFrontObject().
GUIGlObjectType GUIViewObjectsHandler::recomputeBoundaries = GLO_NETWORK |
recompute boundaries
Definition at line 180 of file GUIViewObjectsHandler.h.
Referenced by GUIDialog_ViewSettings::SizePanel::onCmdSizeChange(), and reset().