}
else
{
- if (defaultAction != NULL)
+ if (defaultAction)
defaultAction->mouseReleaseEvent(e);
else
e->ignore();
*/
void RS_EventHandler::mouseMoveEvent(QMouseEvent * e)
{
- if (actionIndex >= 0 && currentActions[actionIndex] != NULL
+ if (actionIndex >= 0 && currentActions[actionIndex]
&& !currentActions[actionIndex]->isFinished())
{
currentActions[actionIndex]->mouseMoveEvent(e);
}
else
{
- if (defaultAction!=NULL)
+ if (defaultAction)
{
defaultAction->mouseMoveEvent(e);
e->accept();
}
else
{
- if (RS_DIALOGFACTORY != NULL)
+ if (RS_DIALOGFACTORY)
RS_DIALOGFACTORY->commandMessage("Expression Syntax Error");
}
// 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);
}
else
{
- if (defaultAction != NULL)
+ if (defaultAction)
defaultAction->commandEvent(e);
}
}
{
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];
}
else
{
- if (defaultAction != NULL)
+ if (defaultAction)
{
predecessor = defaultAction;
predecessor->suspend();
*/
bool RS_EventHandler::hasAction()
{
- if (actionIndex != -1 || defaultAction != NULL)
+ if (actionIndex != -1 || defaultAction)
return true;
return false;