Virtual work - Tension in a string

I am confused about the way Tension or Thrust is used in equation of virtual work. I mean whether to use $T\cdot dr$ or $-T\cdot dr$ (work done by tension). For instance in the below case :

A string of length a forms the shorter diagonal of a rhombus of four uniform rods each of length b and weight W which are hinged together. If the uppermost rod be supported in a horizontal position , prove that the tension of the string is $$\frac{2W(2b^2 - a^2 )}{b\sqrt{4b^2-a^2}}.$$

My Approach: Assuming T is tension in string BD. $$BD = 2b\cos\theta$$ As $\theta$ increases, the length of the string decreases or movement of string is in the direction of tension, hence the work done by tension should be postive. Hence the equation of principle work would be $$T\delta(2b \cos\theta) + 4W \delta(b \sin\theta \cos\theta) = 0$$ but the solution in book says $$-T\delta(2b \cos\theta) + 4W \delta(b \sin\theta \cos\theta) = 0$$