]> Shamusworld >> Repos - architektonas/blobdiff - src/forms/lineangleoptions.cpp
Initial removal of unnecessary rs_ prefixes from files.
[architektonas] / src / forms / lineangleoptions.cpp
index 43775e41702fbf6a853f8f98fb9f8dc7ea7cf67c..5fd69d5121ca1d5c03e8532ce390b53bdb271b7c 100644 (file)
@@ -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 <jlhamm@acm.org>
 //
@@ -15,6 +17,7 @@
 #include "lineangleoptions.h"
 
 #include "actiondrawlineangle.h"
+#include "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);
 }