void MapEditorToolBase::init() { connect(map(), SIGNAL(objectSelectionChanged()), this, SLOT(objectSelectionChanged())); connect(map(), SIGNAL(selectedObjectEdited()), this, SLOT(updateDirtyRect())); initImpl(); updateDirtyRect(); updateStatusText(); MapEditorTool::init(); }
void ScaleTool::init() { // Set initial scaling center to the center of the bounding box of the selected objects if (map()->getNumSelectedObjects() > 0) { QRectF rect; map()->includeSelectionRect(rect); scaling_center = MapCoordF(rect.center()); scaling_center_set = true; } connect(map(), SIGNAL(objectSelectionChanged()), this, SLOT(objectSelectionChanged())); connect(map(), SIGNAL(selectedObjectEdited()), this, SLOT(updateDirtyRect())); updateDirtyRect(); updateStatusText(); MapEditorTool::init(); }