]> Shamusworld >> Repos - architektonas/blobdiff - src/base/rs_eventhandler.cpp
Fixed preview rendering for ActionDrawLine...
[architektonas] / src / base / rs_eventhandler.cpp
index d12d76bab277ed44e100cd1a3aaed0725b2f15bc..a92775c000a6bc46ae54318b8e1bfa51cae9565c 100644 (file)
@@ -132,7 +132,7 @@ void RS_EventHandler::mouseReleaseEvent(QMouseEvent * e)
        }
        else
        {
-               if (defaultAction != NULL)
+               if (defaultAction)
                        defaultAction->mouseReleaseEvent(e);
                else
                        e->ignore();
@@ -144,7 +144,7 @@ void RS_EventHandler::mouseReleaseEvent(QMouseEvent * e)
  */
 void RS_EventHandler::mouseMoveEvent(QMouseEvent * e)
 {
-       if (actionIndex >= 0 && currentActions[actionIndex] != NULL
+       if (actionIndex >= 0 && currentActions[actionIndex]
                && !currentActions[actionIndex]->isFinished())
        {
                currentActions[actionIndex]->mouseMoveEvent(e);
@@ -152,7 +152,7 @@ void RS_EventHandler::mouseMoveEvent(QMouseEvent * e)
        }
        else
        {
-               if (defaultAction!=NULL)
+               if (defaultAction)
                {
                        defaultAction->mouseMoveEvent(e);
                        e->accept();
@@ -375,7 +375,7 @@ void RS_EventHandler::commandEvent(RS_CommandEvent * e)
                                        }
                                        else
                                        {
-                                               if (RS_DIALOGFACTORY != NULL)
+                                               if (RS_DIALOGFACTORY)
                                                        RS_DIALOGFACTORY->commandMessage("Expression Syntax Error");
                                        }
 
@@ -388,7 +388,7 @@ void RS_EventHandler::commandEvent(RS_CommandEvent * e)
        // send command event directly to current action:
        if (!e->isAccepted())
        {
-               if (actionIndex >= 0 && currentActions[actionIndex] != NULL
+               if (actionIndex >= 0 && currentActions[actionIndex]
                        && !currentActions[actionIndex]->isFinished())
                {
                        currentActions[actionIndex]->commandEvent(e);
@@ -396,7 +396,7 @@ void RS_EventHandler::commandEvent(RS_CommandEvent * e)
                }
                else
                {
-                       if (defaultAction != NULL)
+                       if (defaultAction)
                                defaultAction->commandEvent(e);
                }
        }
@@ -462,14 +462,14 @@ void RS_EventHandler::setCurrentAction(RS_ActionInterface * action)
 {
        RS_DEBUG->print("RS_EventHandler::setCurrentAction");
 
-       if (action == NULL)
+       if (!action)
                return;
 
        // Predecessor of the new action or NULL:
        RS_ActionInterface * predecessor = NULL;
 
        // Suspend current action:
-       if (actionIndex >= 0 && currentActions[actionIndex] != NULL
+       if (actionIndex >= 0 && currentActions[actionIndex]
                && !currentActions[actionIndex]->isFinished())
        {
                predecessor = currentActions[actionIndex];
@@ -478,7 +478,7 @@ void RS_EventHandler::setCurrentAction(RS_ActionInterface * action)
        }
        else
        {
-               if (defaultAction != NULL)
+               if (defaultAction)
                {
                        predecessor = defaultAction;
                        predecessor->suspend();
@@ -570,7 +570,7 @@ void RS_EventHandler::killAllActions()
  */
 bool RS_EventHandler::hasAction()
 {
-       if (actionIndex != -1 || defaultAction != NULL)
+       if (actionIndex != -1 || defaultAction)
                return true;
 
        return false;