BugFix Counting ShaderSource for reacting in ShaderEditor

This commit is contained in:
Bruno Herbelin
2025-04-23 20:51:40 +02:00
parent 57b89bef0a
commit a6840ade89
3 changed files with 18 additions and 0 deletions

View File

@@ -77,6 +77,13 @@ void CountVisitor::visit (MediaSource& s)
++num_playable_;
}
void CountVisitor::visit (StreamSource& s)
{
++num_source_;
if (s.playable())
++num_playable_;
}
void CountVisitor::visit (SessionFileSource& s)
{
if (s.session() != nullptr)
@@ -152,3 +159,9 @@ void CountVisitor::visit (SrtReceiverSource& s)
if (s.playable())
++num_playable_;
}
void CountVisitor::visit (ShaderSource& )
{
++num_source_;
++num_playable_;
}

View File

@@ -24,6 +24,7 @@ public:
void visit (Stream& n) override;
void visit (MediaPlayer& n) override;
void visit (MediaSource& s) override;
void visit (StreamSource& s) override;
void visit (SessionFileSource& s) override;
void visit (SessionGroupSource& s) override;
void visit (RenderSource& s) override;
@@ -34,6 +35,7 @@ public:
void visit (MultiFileSource& s) override;
void visit (GenericStreamSource& s) override;
void visit (SrtReceiverSource& s) override;
void visit (ShaderSource &) override;
};
#endif // INFOVISITOR_H

View File

@@ -141,6 +141,9 @@ void ShaderEditWindow::setVisible(bool on)
Settings::application.widget.shader_editor = on;
// reset current
current_ = nullptr;
_cs_id = 0;
}
bool ShaderEditWindow::Visible() const