removed redundant conditions
authorHolger Schemel <info@artsoft.org>
Thu, 20 Oct 2022 16:04:41 +0000 (18:04 +0200)
committerHolger Schemel <info@artsoft.org>
Thu, 20 Oct 2022 16:04:41 +0000 (18:04 +0200)
This issue was found by Cppcheck (static C/C++ code analysis tool).

src/editor.c

index 833dce2ec7996d81f106a9d3522178bb274753bc..b2bb56b958ff47fa38df4693d2955a5b44c0b828 100644 (file)
@@ -13020,9 +13020,6 @@ static void HandleDrawingAreas(struct GadgetInfo *gi)
   if (!IS_VALID_BUTTON(button))
     return;
 
-  if (!button && !button_release_event)
-    return;
-
   // handle info callback for each invocation of action callback
   gi->callback_info(gi);
 
@@ -13058,10 +13055,9 @@ static void HandleDrawingAreas(struct GadgetInfo *gi)
          if (edit_mode == ED_MODE_DRAWING && draw_with_brush &&
              !inside_drawing_area)
            DeleteBrushFromCursor();
-       }
 
-       if (!button || button_release_event)
          break;
+       }
 
        if (draw_with_brush)
        {