]> Shamusworld >> Repos - architektonas/blobdiff - src/actions/actiondimension.cpp
Fixed problem with dimensions not showing up.
[architektonas] / src / actions / actiondimension.cpp
index d4d3c66aa5c72f48b567bd336a2b150fc73e41f9..0f1c773b59725972c28906b49c00702c134ada3b 100644 (file)
@@ -30,7 +30,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 +43,7 @@ void ActionDimension::hideOptions()
 {
        ActionInterface::hideOptions();
 
-       if (RS_DIALOGFACTORY != NULL)
+       if (RS_DIALOGFACTORY)
                RS_DIALOGFACTORY->requestOptions(this, false);
 }
 
@@ -51,7 +51,7 @@ void ActionDimension::showOptions()
 {
        ActionInterface::showOptions();
 
-       if (RS_DIALOGFACTORY != NULL)
+       if (RS_DIALOGFACTORY)
                RS_DIALOGFACTORY->requestOptions(this, true, true);
 }
 
@@ -62,13 +62,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 +138,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);
 }
-