Fix line not drawing clean way + remove lines when hiding markers refs #5083