X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fforms%2Flineangleoptions.cpp;h=626d0a4395c0cdefa17f72e8fee1778a3d974d90;hb=af32602b9d8075080d5805143f1cd47fc10672e1;hp=43775e41702fbf6a853f8f98fb9f8dc7ea7cf67c;hpb=d774c2655ba2c3657a565f325411144452392277;p=architektonas diff --git a/src/forms/lineangleoptions.cpp b/src/forms/lineangleoptions.cpp index 43775e4..626d0a4 100644 --- a/src/forms/lineangleoptions.cpp +++ b/src/forms/lineangleoptions.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 // @@ -15,6 +17,7 @@ #include "lineangleoptions.h" #include "actiondrawlineangle.h" +#include "rs_debug.h" #include "settings.h" LineAngleOptions::LineAngleOptions(QToolBar * parent/*= 0*/, Qt::WindowFlags flags/*= 0*/): @@ -70,7 +73,7 @@ LineAngleOptions::~LineAngleOptions() void LineAngleOptions::setAction(ActionInterface * a, bool update) { - if (a != NULL && a->rtti() == RS2::ActionDrawLineAngle) + if (a && a->rtti() == RS2::ActionDrawLineAngle) { action = (ActionDrawLineAngle *)a; @@ -80,8 +83,7 @@ void LineAngleOptions::setAction(ActionInterface * a, bool update) leAngle->hide(); } - QString sa; - QString sl; + QString sa, sl; int sp; // settings from action: @@ -120,18 +122,18 @@ void LineAngleOptions::setAction(ActionInterface * a, bool update) void LineAngleOptions::updateAngle(const QString & a) { - if (action != NULL && !action->hasFixedAngle()) + if (action && !action->hasFixedAngle()) action->setAngle(RS_Math::deg2rad(RS_Math::eval(a))); } void LineAngleOptions::updateLength(const QString & l) { - if (action != NULL) + if (action) action->setLength(RS_Math::eval(l)); } void LineAngleOptions::updateSnapPoint(int sp) { - if (action != NULL) + if (action) action->setSnapPoint(sp); }