Skip to content

Commit

Permalink
Don't show VSync if not in developer mode
Browse files Browse the repository at this point in the history
  • Loading branch information
acolombier committed May 21, 2024
1 parent c6731df commit f6bd919
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/waveform/waveformwidgetfactory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -872,8 +872,6 @@ void WaveformWidgetFactory::evaluateWidgets() {
for (WaveformWidgetType::Type type : WaveformWidgetType::kValues) {
// this lambda needs its type specified explicitly,
// requiring it to be called with via `.operator()<WaveformT>()`
collectedHandles.insert(type,
QList<WaveformWidgetBackend>());
auto setWaveformVarsByType = [&]<typename WaveformT>() {
bool useOpenGl = WaveformT::useOpenGl();
bool useOpenGles = WaveformT::useOpenGles();
Expand Down Expand Up @@ -917,7 +915,12 @@ void WaveformWidgetFactory::evaluateWidgets() {
}

if (active) {
collectedHandles[type].push_back(backend);
if (collectedHandles.contains(type)) {
collectedHandles[type].push_back(backend);
} else {
collectedHandles.insert(type,
QList<WaveformWidgetBackend>{backend});
}
}
};

Expand Down

0 comments on commit f6bd919

Please sign in to comment.