Position issue with multiple materials on one object

Hi there folks.

Basically, I’ve got the following model:
[17352-full+mesh.jpg|17352]

Each segment on the x axis is assigned a different material, so that each section can be edit separately.

The problem I’m having is that the materials are assigned in the order shown on the left in the following image. Is there a way to assign them so that they are assigned in the order shown on the right?
[17353-render+desired+order.jpg|17353]

Solved. The issue was with the order of the submeshes.