# How do I make underlined titles at KOMA-script?

I trying to make underlined title (of the parts) at KOMA-script, but it doesn't works well....

Can you guide me how to do this?

Here is MWE:

% Preview source code

%% Do not edit unless you really know what you are doing.
\documentclass[a4paper,english,hebrew]{scrartcl}
\usepackage{fontspec}
\usepackage{fancyhdr}
\pagestyle{fancy}
\setlength{\parindent}{0bp}

\makeatletter

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LyX specific LaTeX commands.
\pdfpageheight\paperheight
\pdfpagewidth\paperwidth

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.

\setkomafont{part}{\underline\itshape\fontsize{26pt}{26pt}\selectfont}
\setkomafont{partnumber}{\underline\fontsize{26pt}{26pt}\selectfont}
\renewcommand*{\partformat}{Part~ :\thepart~~}
\AtBeginDocument{\renewcommand*{\raggedpart}{\centering}}

\makeatother

\usepackage{polyglossia}
\setdefaultlanguage{hebrew}
\setotherlanguage{english}
\begin{document}

\part{PARTONE}

Hello!
\end{document}


P.S. If I put the \underline tag it's doesn't work, or flush the title to right (I'm Hebrew user).

Thank you!

\renewcommand\partlineswithprefixformat[3]{\hfill\underline{#2#3}\hfill}

seems to work. Then the redefinition of \raggedpart is not needed.