diff --git a/Interface/TextureExtraction.cpp b/Interface/TextureExtraction.cpp
index 2841e4a037f90cb08326308ad165057d9b8656b7..dcef7430486e19deef0c99918381045026bd9f22 100644
--- a/Interface/TextureExtraction.cpp
+++ b/Interface/TextureExtraction.cpp
@@ -37,6 +37,8 @@ extern MolFlow* mApp;
extern SynRad* mApp;
#endif
+constexpr size_t max_plotted_bins = 3000;
+
TextureExtraction::TextureExtraction(InterfaceGeometry* g, Worker* w) : GLWindow() {
interfGeom = g;
work = w;
@@ -1271,9 +1273,9 @@ void TextureExtraction::AddView() {
Refresh();
- if (nbBins > 1000) { // Add a warning if there are more than 1000 bins
- GLMessageBox::Display("For performance reasons only the first 1000 bins will be plotted.\n"
- "You can still get the data for all the bins by using the Copy all data button.", "More than 1000 bins", { "OK" }, GLDLG_ICONWARNING);
+ if (nbBins > max_plotted_bins) { // Add a warning if there are more than max_plotted_bins bins
+ GLMessageBox::Display(fmt::format("For performance reasons only the first {} bins will be plotted.\n"
+ "You can still get the data for all the bins by using the Copy all data button.", max_plotted_bins), fmt::format("More than {} bins", max_plotted_bins), { "OK" }, GLDLG_ICONWARNING);
}
}
@@ -1386,7 +1388,7 @@ void TextureExtraction::RefreshChart() {
if (work->globalStatCache.globalHits.nbDesorbed > 0) {
int mode = physicalModeCombo->GetSelectedIndex();
auto [dataSumsPerBin, areaSumsPerBin] = CalculateViewValues(item, mode);
- size_t plotLimit = std::min(dataSumsPerBin.size(), (size_t)1000);
+ size_t plotLimit = std::min(dataSumsPerBin.size(), max_plotted_bins);
double xScaleFactor = 1;
switch (xScaleCombo->GetSelectedIndex()) { // Choose the right scaling factor for x axis