Skip to content

Commit c95a88d

Browse files
committed
Removed some dead code in stream browser dialog
1 parent cb3f53a commit c95a88d

File tree

1 file changed

+5
-49
lines changed

1 file changed

+5
-49
lines changed

src/ngscopeclient/StreamBrowserDialog.cpp

Lines changed: 5 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,7 @@ bool StreamBrowserDialog::renderOnOffToggle(const char* label, bool alignRight,
416416
@param inst the instrument to render the progress channel for
417417
@param chan the channel to render the progress for
418418
@param isLast true if it is the last channel of the instrument
419-
419+
420420
@return Returns true if the progress bar has been rendered
421421
*/
422422
bool StreamBrowserDialog::renderDownloadProgress(std::shared_ptr<Instrument> inst, InstrumentChannel *chan, bool isLast)
@@ -575,8 +575,8 @@ bool StreamBrowserDialog::renderPsuRows(
575575
bool isVoltage,
576576
bool cc,
577577
PowerSupplyChannel* chan,
578-
std::string& currentValue,
579-
float& committedValue,
578+
std::string& currentValue,
579+
float& committedValue,
580580
std::string& measuredValue,
581581
bool &clicked,
582582
bool &hovered)
@@ -1591,53 +1591,9 @@ void StreamBrowserDialog::renderChannelNode(shared_ptr<Instrument> instrument, s
15911591
startBadgeLine();
15921592
if (scopechan)
15931593
{
1594-
bool chanEnabled = scopechan->IsEnabled();
1595-
15961594
//"trigger" badge on trigger inputs to show they're not displayable channels
15971595
if(scopechan->GetType(0) == Stream::STREAM_TYPE_TRIGGER)
15981596
renderBadge(ImGui::ColorConvertU32ToFloat4(prefs.GetColor("Appearance.Stream Browser.instrument_disabled_badge_color")), "TRIG ONLY", "TRIG","--", nullptr);
1599-
1600-
/* Currently, enable/disable state is coupled to node reference counting, so we can't let the user manually enable/disable channels
1601-
// Scope channel
1602-
else if (!chanEnabled)
1603-
{
1604-
if(renderToggle(
1605-
"###scopeChanEnable",
1606-
true,
1607-
ImGui::ColorConvertU32ToFloat4(prefs.GetColor("Appearance.Stream Browser.instrument_disabled_badge_color")),
1608-
chanEnabled,
1609-
"DISABLED",
1610-
"ENABLE",
1611-
3))
1612-
{
1613-
if(chanEnabled)
1614-
scope->EnableChannel(channelIndex);
1615-
}
1616-
//renderBadge(ImGui::ColorConvertU32ToFloat4(prefs.GetColor("Appearance.Stream Browser.instrument_disabled_badge_color")), "DISABLED", "DISA","--", nullptr);
1617-
}
1618-
*/
1619-
1620-
//Download in progress
1621-
else
1622-
{
1623-
if(!renderDownloadProgress(instrument, channel, isLast))
1624-
{ // No download in progress, we can show the ENABLE/DISABLE toggle
1625-
/* Currently, enable/disable state is coupled to node reference counting, so we can't let the user manually enable/disable channels
1626-
if(renderToggle(
1627-
"###scopeChanEnable",
1628-
true,
1629-
ImGui::ColorConvertU32ToFloat4(prefs.GetColor("Appearance.Stream Browser.instrument_on_badge_color")),
1630-
chanEnabled,
1631-
"DISABLE",
1632-
"ENABLED",
1633-
3))
1634-
{
1635-
if(!chanEnabled)
1636-
scope->DisableChannel(channelIndex);
1637-
}
1638-
*/
1639-
}
1640-
}
16411597
}
16421598
else if(psu)
16431599
{
@@ -1713,7 +1669,7 @@ void StreamBrowserDialog::renderChannelNode(shared_ptr<Instrument> instrument, s
17131669
}
17141670
// Current
17151671
if(renderPsuRows(false,cc,psuchan,psuState->m_setCurrent[channelIndex],psuState->m_committedSetCurrent[channelIndex],mcurrent_txt,clicked,hovered))
1716-
{ // Update set current
1672+
{ // Update set current
17171673
psu->SetPowerCurrent(channelIndex, psuState->m_committedSetCurrent[channelIndex]);
17181674
psuState->m_needsUpdate[channelIndex] = true;
17191675
}
@@ -2166,4 +2122,4 @@ void StreamBrowserDialog::EndBlock()
21662122
{
21672123
ImGui::PopStyleVar();
21682124
}
2169-
}
2125+
}

0 commit comments

Comments
 (0)