Per CURIAM. —
We devoted a great deal of time to an examination and investigation of the questions involved in this case before the writing of the original opinion, but the evident *87time and labor counsel for appellant has given to the preparation of a petition has induced us to again consider the matters complained of in the petition. Such further examination and discussion convinces us of the correctness of the conclusion first reached. Complaint is made in. the petition that the principal point decided was upon an error committed in appellant’s favor rather than against him. This is only partially true. Upon consideration of the case we found that the judgment against defendant on plaintiff’s allegation of unlawful detainer was sustained by the evidence and was properly rendered and entered; at the same time we found that error was committed against defendant wherein the court found that the' lease contained no implied covenant of fitness of the demised premises. Entertaining these views we could not reverse the judgment in unlawful detainer against defendant. To grant a new trial upon defendant’s cross-complaint and the answers thereto would afford him no more relief than we have granted him. Since the case was not properly tried in the first instance on a cross-complaint or counterclaim, it could not properly be so tried upon a new trial. Counsel complains of the following sentence contained in the opinion: “If after an examination of the many errors assigned by appellant both as to the constructions of the lessor’s convenants contained in the lease and the introduction of evidence upon the cross-complaint, we should find error and reverse the judgment and remand the case for a new trial, this question might then be raised by the plaintiff, and the defendant would be in a worse position than he will he after our having settled this issue.” That language was intentionally used and expresses our view. When ■a new trial is granted it is done for all purposes. A party who seeks and obtains a new trial cannot avail himself of the chance of gaining more without incurring the hazard of getting less than upon the former trial. This is true as to all questions of both law and fact not directly passed upon by the appellate court on the appeal. The doctrine of “law of the ease” •extends only to the questions squarely presented and distinctly passed upon on the former appeal. (Hall v. Blackman, 9 Idaho, 555, 75 Pac. 608; McKinley v. Tuttle, 42 Cal. 571; Klau*88ber v. San Diego St. Car Co., 98 Cal. 105, 32 Pac. 876; 2 Ency. of Pl. & Pr. 379.) Tbe appellate court has ilo power or authority'to direct the action of a. trial court upon any matters not before the appellate court on the appeal.
With these principles in view, suppose we should not pass upon the question of filing a counterclaim and cross-complaint in a case like this, and send the case back for a new trial and the question should then be raised; upon what theory could it be said that the law of the ease has been settled as to that question? None, we apprehend. For this reason, and entertaining the view we do of the law as to the counterclaims in such ease, we were entirely correct in saying defendant would be in a worse position for us to reverse the case and send it back without deciding this question than he is after we have decided it upon this appeal.
The other questions presented by the petition are disposed of by the original opinion.
The petition is denied.