X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Factions%2Factiondimension.cpp;h=b5b9fb809fa23af9e88c8f27a5d1e132967f201e;hb=48105dec9198cf5a81dd9286010d0d45e28f70c3;hp=d4d3c66aa5c72f48b567bd336a2b150fc73e41f9;hpb=d774c2655ba2c3657a565f325411144452392277;p=architektonas diff --git a/src/actions/actiondimension.cpp b/src/actions/actiondimension.cpp index d4d3c66..b5b9fb8 100644 --- a/src/actions/actiondimension.cpp +++ b/src/actions/actiondimension.cpp @@ -3,7 +3,9 @@ // Part of the Architektonas Project // Originally part of QCad Community Edition by Andrew Mustun // Extensively rewritten and refactored by James L. Hammons -// (C) 2010 Underground Software +// Portions copyright (C) 2001-2003 RibbonSoft +// Copyright (C) 2010 Underground Software +// See the README and GPLv2 files for licensing and warranty information // // JLH = James L. Hammons // @@ -30,7 +32,7 @@ ActionDimension::~ActionDimension() void ActionDimension::reset() { data = RS_DimensionData(Vector(false), Vector(false), RS2::VAlignMiddle, - RS2::HAlignCenter, RS2::Exact, 1.0, "", "Standard", 0.0); + RS2::HAlignCenter, RS2::Exact, 1.0, "", "Standard", 0.0); diameter = false; } @@ -43,7 +45,7 @@ void ActionDimension::hideOptions() { ActionInterface::hideOptions(); - if (RS_DIALOGFACTORY != NULL) + if (RS_DIALOGFACTORY) RS_DIALOGFACTORY->requestOptions(this, false); } @@ -51,7 +53,7 @@ void ActionDimension::showOptions() { ActionInterface::showOptions(); - if (RS_DIALOGFACTORY != NULL) + if (RS_DIALOGFACTORY) RS_DIALOGFACTORY->requestOptions(this, true, true); } @@ -62,13 +64,13 @@ void ActionDimension::updateMouseCursor() void ActionDimension::updateToolBar() { - if (RS_DIALOGFACTORY != NULL) - { - if (!isFinished()) - RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap); - else - RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarDim); - } + if (!RS_DIALOGFACTORY) + return; + + if (!isFinished()) + RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap); + else + RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarDim); } QString ActionDimension::getText() @@ -138,9 +140,8 @@ void ActionDimension::setDiameter(bool d) /*static*/ bool ActionDimension::isDimensionAction(RS2::ActionType type) { return (type == RS2::ActionDimAligned - || type == RS2::ActionDimLinear - || type == RS2::ActionDimAngular - || type == RS2::ActionDimDiametric - || type == RS2::ActionDimRadial); + || type == RS2::ActionDimLinear + || type == RS2::ActionDimAngular + || type == RS2::ActionDimDiametric + || type == RS2::ActionDimRadial); } -