#include "dialogfactory.h"
#include "graphicview.h"
#include "preview.h"
-#include "snapper.h"
ActionDimAligned::ActionDimAligned(EntityContainer & container, GraphicView & graphicView): ActionDimension("Draw aligned dimensions",
container, graphicView)
//DEBUG->print("EntityContainer::adjustBorders");
//resetBorders();
- if (entity != NULL)
- {
- // make sure a container is not empty (otherwise the border
- // would get extended to 0/0):
- if (!entity->isContainer() || entity->count() > 0)
- {
- minV = Vector::minimum(entity->getMin(), minV);
- maxV = Vector::maximum(entity->getMax(), maxV);
- }
+ if (entity == NULL)
+ return;
- // Notify parents. The border for the parent might
- // also change TODO: Check for efficiency
- //if(parent!=NULL) {
- //parent->adjustBorders(this);
- //}
+ // make sure a container is not empty (otherwise the border
+ // would get extended to 0/0):
+ if (!entity->isContainer() || entity->count() > 0)
+ {
+ minV = Vector::minimum(entity->getMin(), minV);
+ maxV = Vector::maximum(entity->getMax(), maxV);
}
+
+ // Notify parents. The border for the parent might
+ // also change TODO: Check for efficiency
+ //if(parent!=NULL) {
+ //parent->adjustBorders(this);
+ //}
}
/**
if (entity == NULL || entity->isUndone())
return;
- // only border preview for complex entities:
- //if ((entity->count() > maxEntities-count()) &&
-
+ // Only border preview for complex entities:
bool addBorder = false;
if (entity->rtti() == RS2::EntityImage || entity->rtti() == RS2::EntityHatch
{
addBorder = true;
}
- else
+ else if (entity->isContainer() && entity->rtti() != RS2::EntitySpline)
{
- if (entity->isContainer() && entity->rtti() != RS2::EntitySpline)
- {
- if (entity->countDeep() > maxEntities-countDeep())
- addBorder = true;
- }
+ if (entity->countDeep() > maxEntities - countDeep())
+ addBorder = true;
}
if (addBorder)