*/
RS_Block * RS_Insert::getBlockForInsert()
{
- if (block != NULL)
+ if (block)
return block;
RS_BlockList * blkList;
- if (data.blockSource == NULL)
+ if (!data.blockSource)
{
- if (getGraphic() != NULL)
- {
- blkList = getGraphic()->getBlockList();
- }
- else
- {
- blkList = NULL;
- }
+ blkList = (getGraphic() ? getGraphic()->getBlockList() : NULL);
}
else
{
RS_Block * blk = NULL;
- if (blkList != NULL)
- {
+ if (blkList)
blk = blkList->find(data.name);
- }
- if (blk != NULL)
+/*???
+ if (blk)
{
}
+*/
block = blk;
RS_DEBUG->print("RS_Insert::update: insertionPoint: %f/%f",
data.insertionPoint.x, data.insertionPoint.y);
- if (updateEnabled == false)
+ if (!updateEnabled)
return;
clear();
-
RS_Block * blk = getBlockForInsert();
- if (blk == NULL)
+ if (!blk)
{
- //return NULL;
RS_DEBUG->print("RS_Insert::update: Block is NULL");
return;
}
RS_DEBUG->print("RS_Insert::update: move 1");
if (fabs(data.scaleFactor.x) > 1.0e-6 && fabs(data.scaleFactor.y) > 1.0e-6)
{
- ne->move(data.insertionPoint + Vector(data.spacing.x / data.scaleFactor.x * c,
- data.spacing.y / data.scaleFactor.y * r));
+ ne->move(data.insertionPoint + Vector(data.spacing.x / data.scaleFactor.x * c, data.spacing.y / data.scaleFactor.y * r));
}
else
{