mirror of
https://github.com/brunoherbelin/vimix.git
synced 2025-12-20 22:59:59 +01:00
BugFix New Source File Doubleclic
WTF did I think it would be a good idea to delete a source in a separate thread? This obviously causes a crash. To be investigated when a source tailes to delete... but should not happen...
This commit is contained in:
@@ -741,7 +741,7 @@ void ImGuiVisitor::visit (RenderSource& s)
|
||||
if (ImGuiToolkit::IconButton(ICON_FA_PLAY_CIRCLE, "Open in Player"))
|
||||
UserInterface::manager().showSourceEditor(&s);
|
||||
ImGui::SameLine();
|
||||
if (ImGuiToolkit::IconButton(ICON_FA_WINDOW_MAXIMIZE, "Show Output"))
|
||||
if (ImGuiToolkit::IconButton(ICON_FA_LAPTOP, "Show Output"))
|
||||
Settings::application.widget.preview = true;
|
||||
ImGui::SetCursorPos(pos);
|
||||
|
||||
|
||||
@@ -8333,19 +8333,10 @@ SourcePreview::SourcePreview() : source_(nullptr), label_(""), reset_(0)
|
||||
|
||||
}
|
||||
|
||||
static void deletesource(Source *s)
|
||||
{
|
||||
delete s;
|
||||
}
|
||||
|
||||
void SourcePreview::setSource(Source *s, const string &label)
|
||||
{
|
||||
if(source_) {
|
||||
if (source_->ready())
|
||||
if(source_)
|
||||
delete source_;
|
||||
else
|
||||
std::thread (deletesource, source_).detach();
|
||||
}
|
||||
|
||||
source_ = s;
|
||||
label_ = label;
|
||||
|
||||
Reference in New Issue
Block a user