diff --git a/optional/interfaces/mainscreen/tanscreen.simba b/optional/interfaces/mainscreen/tanscreen.simba index 3912630e..c82f5886 100644 --- a/optional/interfaces/mainscreen/tanscreen.simba +++ b/optional/interfaces/mainscreen/tanscreen.simba @@ -85,14 +85,12 @@ end; function TRSTanScreen.ClickHide(hide: ERSHide; option: String = 'Tan All'; waitTime: Int32 = -1): Boolean; begin Result := Self.HoverHide(hide); + if not Result then Exit; - if not Result then - Exit; - - if (option <> '') or (option <> 'Tan 1') then - Result := ChooseOption.Select(option) //if we chooseoption we might want to reset result. + if (option = '') or MainScreen.IsUpText('Tan All') then + Mouse.Click(MOUSE_LEFT) else - Mouse.Click(MOUSE_LEFT); + Result := ChooseOption.Select(option); //if we chooseoption we might want to reset result. if waitTime > 0 then Result := WaitUntil(not Self.IsOpen(), 100, waitTime);