]> Shamusworld >> Repos - architektonas/blobdiff - src/forms/lineangleoptions.cpp
Fixed Library Browser...
[architektonas] / src / forms / lineangleoptions.cpp
index e2e75b139de11829b8074c9b58aeb818e12b94af..626d0a4395c0cdefa17f72e8fee1778a3d974d90 100644 (file)
@@ -17,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*/):
@@ -72,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;
 
@@ -82,8 +83,7 @@ void LineAngleOptions::setAction(ActionInterface * a, bool update)
                        leAngle->hide();
                }
 
-               QString sa;
-               QString sl;
+               QString sa, sl;
                int sp;
 
                // settings from action:
@@ -122,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);
 }