Skip to content

Commit 0d94fe5

Browse files
committed
GPU Display: Suppress generic SetInfo change-messages for certain variables
1 parent 6dd6818 commit 0d94fe5

2 files changed

Lines changed: 3 additions & 5 deletions

File tree

‎GPU/GPUTracking/display/frontend/GPUDisplayFrontendConfig.cxx‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -116,11 +116,6 @@ struct GPUDisplayFrontend::configRTTIInfo {
116116
template <class T, class M>
117117
uint32_t getRTTIIndex(GPUDisplay& display, M T::* member) // RTTI index of a direct member of a config struct
118118
{
119-
if constexpr (std::is_same_v<T, GPUDisplayControl> && std::is_same_v<M, bool>) {
120-
if (member == &GPUDisplayControl::dummy) { // Keys / buttons that do not change a setting
121-
return INVALID_INDEX;
122-
}
123-
}
124119
const T& obj = configStruct<T>(display);
125120
return rttiReverseId[configStructIndex<T>()][(const char*)&(obj.*member) - (const char*)&obj];
126121
}

‎GPU/GPUTracking/display/frontend/GPUDisplayFrontendConfigInfo.inc‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@
2020
void GPUDisplay::buildConfigInfo()
2121
{
2222
auto addInfo = [this](std::pair<uint32_t, configKeyCallback>&& info) { mFrontend->mConfigRTTI->configInfos[info.first] = std::move(info.second); };
23+
static constexpr std::tuple noInfo{&GPUDisplayControl::dummy, &GPUSettingsDisplayLight::drawClusters, &GPUSettingsDisplayLight::drawInitLinks, &GPUSettingsDisplayLight::drawLinks, &GPUSettingsDisplayLight::drawSeeds,
24+
&GPUSettingsDisplayLight::drawTracklets, &GPUSettingsDisplayLight::drawTracks, &GPUSettingsDisplayLight::drawExtrapolatedTracks, &GPUSettingsDisplayLight::drawFinal}; // Options without info, not even the generic one
25+
std::apply([this](auto... member) { ((mFrontend->mConfigRTTI->configInfos[mFrontend->mConfigRTTI->getRTTIIndex(*this, member)] = []() {}), ...); }, noInfo);
2326
addInfo(INFO_LAMBDA(mCfgC, mDisplayControl, if (val == 2) { SetInfo("Exiting", 1); }));
2427
addInfo(INFO_LAMBDA(mCfgC, mResetScene, SetInfo("View reset", 1);));
2528
addInfo(INFO_LAMBDA(mCfgC, mRequestScreenshot, SetInfo("Taking screenshot (%s)", mScreenshotFile.c_str());));

0 commit comments

Comments
 (0)