Let X be an infinite-dimensional real or complex Banach space, B(X) the algebra of all bounded linear operators on X, and P(X) ⊂ B(X) the subset of all idempotents. We characterize bijective maps on P(X) preserving commutativity in both directions. This unifies and extends the characterizations of two types of automorphisms of P(X), with respect to the orthogonality relation and with respect to the usual partial order; the latter have been previously characterized by Ovchinnikov. We also describe bijective orthogonality preserving maps on the set of idempotents of a fixed finite rank. As an application we present a nonlinear extension of the structural result for bijective linear biseparating maps on B(X).