A limited partnership is dissolved and its affairs shall be wound up upon the happening of the first to occur of the following:
(1) At the time or upon the happening of events specified in the partnership agreement;
(2) Written consent to dissolution of all partners;
(3) An event of withdrawal of a general partner unless at the time there is at least one other general partner and the partnership agreement permits the business of the limited partnership to be carried on by the remaining general partner and that partner does so, but the limited partnership is not dissolved and is not required to be wound up by reason of any event of withdrawal if (i) all partners have previously consented in the partnership agreement or otherwise to have a specific person designated as a general partner or (ii) within one hundred eighty days after the withdrawal, all partners other than the withdrawn general partner agree in writing to continue the business of the limited partnership and to the appointment of one or more additional general partners if necessary or desired; or
(4) Entry of a decree of judicial dissolution under section 67-277.