X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fforms%2Flineangleoptions.cpp;h=626d0a4395c0cdefa17f72e8fee1778a3d974d90;hb=bd2b29c8735d83ab48df13c3efee53f63570473e;hp=3695d9891fcee8b723826ee85a13e66ec88b0330;hpb=95a6dd28327cbd80f9221b1457e7edd4e7230169;p=architektonas diff --git a/src/forms/lineangleoptions.cpp b/src/forms/lineangleoptions.cpp index 3695d98..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 // @@ -14,7 +16,8 @@ #include "lineangleoptions.h" -#include "rs_actiondrawlineangle.h" +#include "actiondrawlineangle.h" +#include "rs_debug.h" #include "settings.h" LineAngleOptions::LineAngleOptions(QToolBar * parent/*= 0*/, Qt::WindowFlags flags/*= 0*/): @@ -68,11 +71,11 @@ LineAngleOptions::~LineAngleOptions() } } -void LineAngleOptions::setAction(RS_ActionInterface * a, bool update) +void LineAngleOptions::setAction(ActionInterface * a, bool update) { - if (a != NULL && a->rtti() == RS2::ActionDrawLineAngle) + if (a && a->rtti() == RS2::ActionDrawLineAngle) { - action = (RS_ActionDrawLineAngle *)a; + action = (ActionDrawLineAngle *)a; if (action->hasFixedAngle()) { @@ -80,8 +83,7 @@ void LineAngleOptions::setAction(RS_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(RS_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); }