     layerWindowPosition.x += layerWindow.width / 2;
     layerWindow.visible = true;
     layerWindow.BringToFront();
-    
-    // Subscribe while window are visible
-    SubscribeToEvent("MouseMove", "HandleHideLayerEditor");
-    SubscribeToEvent("MouseButtonDown", "HandleHideLayerEditor");
-    SubscribeToEvent("MouseWheel", "HandleMaskTypeScroll");
-     
+
     return true;
 }
 

            bits[i].vars["index"] = i;
            SubscribeToEvent(bits[i], "Toggled", "ToggleBits");
    }
}

bool ShowLayerEditor()

    patternMaskNode = node;
    
    // just change position if already opened
    if (layerWindow.visible == true)
    {
        HideLayerEditor();
        /*
