@@ -111,7 +111,8 @@ Channels Options::shadowChannels() const
111111 &ch2 = shadow.at (ChannelId::noop);
112112 auto &&stacker : shadow.getDimensions ({data (stackChannels),
113113 std::size_t {1 } + secondary.has_value ()})) {
114- ch1.removeSeries (stacker);
114+ if (stackChannelType () != subAxisType () || !isSplit ())
115+ ch1.removeSeries (stacker);
115116 ch2.removeSeries (stacker);
116117 }
117118
@@ -122,7 +123,7 @@ void Options::drilldownTo(const Options &other)
122123{
123124 auto &stackChannel = this ->stackChannel ();
124125
125- if (this -> split && ! isSplit ()) this ->split = {};
126+ if (! isSplit () || !other. isSplit ()) this ->split = {};
126127
127128 for (auto &&dim : other.getChannels ().getDimensions ())
128129 if (!getChannels ().isSeriesUsed (dim))
@@ -134,13 +135,14 @@ void Options::intersection(const Options &other)
134135 for (auto &&dim : getChannels ().getDimensions ())
135136 if (!other.getChannels ().isSeriesUsed (dim))
136137 getChannels ().removeSeries (dim);
138+
139+ split = {};
137140}
138141
139142bool Options::looksTheSame (const Options &other) const
140143{
141144 if (channels.anyAxisSet ()
142- && channels.at (ChannelId::label).isEmpty ()
143- && isSplit () == other.isSplit ()) {
145+ && channels.at (ChannelId::label).isEmpty ()) {
144146 auto thisCopy = *this ;
145147 thisCopy.simplify ();
146148
@@ -155,8 +157,9 @@ bool Options::looksTheSame(const Options &other) const
155157
156158void Options::simplify ()
157159{
160+ if (isSplit ()) return ;
161+
158162 // remove all dimensions, only used at the end of stack
159- auto split = isSplit ();
160163 auto &stackChannel = this ->stackChannel ();
161164
162165 auto dimensions = stackChannel.dimensions ();
@@ -170,8 +173,6 @@ void Options::simplify()
170173 ++dim) {
171174 stackChannel.removeSeries (*dim);
172175 }
173- if (split && !stackChannel.hasDimension ())
174- stackChannel.addSeries (*dimensions.begin ());
175176}
176177
177178bool Options::operator ==(const Options &other) const
0 commit comments