Clearly the line has to pass through a vertex. WLOG, let the triangle be $\triangle ABC$ with angles $\alpha, \beta, \gamma,$ and let the line pass through $A.$ Then the line splits $\alpha$ into $\alpha_1,\alpha_2.$ Let the line through $A$ pass $BC$ at $D.$ Then $\angle ADB=180-\alpha_1-\beta,$ and $\angle ADC=180-\alpha_2-\gamma.$
When is $\triangle ABD$ isosceles?
This happens when at least one of the following are true:
(a) $\alpha_1=\beta$
(b) $\alpha_1=180-\alpha_1-beta\to 2\alpha_1+\beta=180$
(c) $\beta=180-\alpha_1-\beta\to \alpha_1+2\beta=180$
Similarly, $\triangle ACD$ is isosceles when at least one of the following are true:
(a) $\alpha_2=\gamma$
(b) $\alpha_2=180-\alpha_2-gamma\to 2\alpha_2+\gamma=180$
(c) $\gamma=180-\alpha_2-\gamma\to \alpha_2+2\gamma=180$
Couple this with the fact that $\alpha_1+\alpha_2+\gamma+\beta=180,$ and pair up all possible pairs of conditions. This will get you the answer (someone perhaps could finish this up for me).