public void fillArr(int x, int y) {
        ArrayList<Delta> changes = currentTool.apply(curColor, x, y, currentLayer.colorArr);
        ArrayList<Delta> accepted = new ArrayList<>();
        for (Delta d : changes) {
            if (!d.amUseless()) {
                accepted.add(d);
            }

        }
        currentLayer.redo = new Stack<>();
        if (accepted.size() > 0) {
            currentLayer.undo.push(accepted);
        }
    }