I'm looking for a way to draw a thin line around a multipart shape. For a normal shape, an easy way to do this is to use preaction
to draw an even thicker line around the existing shape. Unfortunately, somehow the preaction seems to happen after the node parts are drawn in multipart shapes, giving an unwanted inner line.
Below is a minimal working example. You can see for the regular box on the right, there is just a thin orange line around the outside. However, for the multipart "contents box" on the left, there is a second, inner orange box. My question is how to get rid of this inner box. I'm not necessarily wedded to multipart nodes if there's a better way to draw these boxes, but I would like them to be a node so I can draw arrows to them. (BTW, I know that for the regular box I can do this without a preaction, I just used one to illustrate what I'm trying to do to multipart nodes.)
\documentclass[convert]{standalone}
\usepackage{tikz}
\usetikzlibrary{shapes.multipart}
\begin{document}
\begin{tikzpicture}[
contents box/.style={
rounded corners,
rectangle split, rectangle split parts=2,
rectangle split draw splits=false,
rectangle split part fill={orange!50, white},
every one node part/.style={
font=\sffamily\bfseries\small,
},
draw=orange!50, very thick,
preaction={draw=orange, ultra thick},
},
regular box/.style={
font=\sffamily\bfseries\small,
rounded corners,
fill=orange!50,
very thick, draw=orange!50,
preaction={draw=orange, ultra thick},
}
]
\node[contents box] {
\nodepart{one} box
\nodepart{two} contents
};
\node[regular box] at (2,0) { box };
\end{tikzpicture}
\end{document}