diff --git a/toonz/sources/tnztools/toonzrasterbrushtool.cpp b/toonz/sources/tnztools/toonzrasterbrushtool.cpp
index 39b295c..bbe67b1 100644
--- a/toonz/sources/tnztools/toonzrasterbrushtool.cpp
+++ b/toonz/sources/tnztools/toonzrasterbrushtool.cpp
@@ -1262,27 +1262,23 @@ void ToonzRasterBrushTool::leftButtonDown(const TPointD &pos,
   // todo: gestire autoenable
   if (!m_enabled) return;
 
-  TPointD centeredPos = getCenteredCursorPos(pos);
-
-  m_active       = !!getImage(true);
-  if (!m_active) {
-    m_active = !!touchImage();
-  }
+  m_active = !!getImage(true);
+  if (!m_active) m_active = !!touchImage();
   if (!m_active) return;
 
-  if (m_active) {
-    // nel caso che il colore corrente sia un cleanup/studiopalette color
-    // oppure il colore di un colorfield
+  // nel caso che il colore corrente sia un cleanup/studiopalette color
+  // oppure il colore di un colorfield
+  if (TColorStyle *cs = app->getCurrentLevelStyle()) {
     m_styleId = app->getCurrentLevelStyleIndex();
-    TColorStyle *cs = app->getCurrentLevelStyle();
-    if (cs) {
-      TRasterStyleFx *rfx = cs ? cs->getRasterStyleFx() : 0;
-      m_active = cs != 0 && (cs->isStrokeStyle() || (rfx && rfx->isInkStyle()));
-    } else {
-      m_styleId = 1;
-    }
+    TRasterStyleFx *rfx = cs->getRasterStyleFx();
+    if (!cs->isStrokeStyle() && (!rfx || !rfx->isInkStyle()))
+        { m_active = false; return; }
+  } else {
+    m_styleId = 1;
   }
 
+  TPointD centeredPos = getCenteredCursorPos(pos);
+  
   // Modifier to do straight line
   if (e.isShiftPressed()) {
     m_isStraight = true;
@@ -2036,12 +2032,7 @@ void ToonzRasterBrushTool::onEnter() {
 
   Application *app = getApplication();
 
-  m_styleId       = app->getCurrentLevelStyleIndex();
-  TColorStyle *cs = app->getCurrentLevelStyle();
-  if (cs) {
-    TRasterStyleFx *rfx = cs->getRasterStyleFx();
-    m_active            = cs->isStrokeStyle() || (rfx && rfx->isInkStyle());
-  }
+  m_styleId = app->getCurrentLevelStyleIndex();
   m_active = img;
 }