Commits

Takeshi Nakazato authored 338c6b456ee
Fix wrong "whole range"

CAS-12085 Fixed wrong "whole range" that should be defined as [-(double max):+(double max)]. Previous implementation was wrong: [+(double min):+(double max)], which uses numeric_limits<double>::min()/max(). Now the range is numeric_limits<double>::lowest()/max(), which is corresponding to [-(double max):+(double max)].

code/plotms/Actions/ActionFlagAll.cc

Modified
122 122 if(!visible) {
123 123 // std::cout << "canvas " << j << " is not visible. continue." << std::endl;
124 124 continue;
125 125 }
126 126
127 127 bool isCanvasMarkedForFlag = canv[j]->isMarkedForFlag();
128 128 bool isCanvasMarkedForUnFlag = canv[j]->isMarkedForUnflag();
129 129
130 130
131 131 vector<PlotRegion> regions(1);
132 - constexpr double kDoubleMin = std::numeric_limits<double>::min();
132 + constexpr double kDoubleMin = std::numeric_limits<double>::lowest();
133 133 constexpr double kDoubleMax = std::numeric_limits<double>::max();
134 134 PlotCoordinate const upperLeft(kDoubleMin, kDoubleMax);
135 135 PlotCoordinate const lowerRight(kDoubleMax, kDoubleMin);
136 136 regions[0] = PlotRegion(upperLeft, lowerRight);
137 137 if (isCanvasMarkedForFlag) {
138 138 // flag plotted data
139 139 //std::cout << "canvas " << j << " is marked for flag." << std::endl;
140 140 //std::cout << "regions[0]: " << regions[0].bottom() << ", " << regions[0].left()
141 141 // << ", " << regions[0].top() << ", " << regions[0].right() << std::endl;
142 142 FlagActionUtil::flagRange(client, plot, j, regions, showUnflagged, showFlagged);

Everything looks good. We'll let you know here if there's anything you should know about.

Add shortcut