Skip to content
Snippets Groups Projects
Commit 4c965cf5 authored by jsiegle's avatar jsiegle
Browse files

Fix crash when deleting complex signal chains

parent 063c3932
No related branches found
No related tags found
No related merge requests found
......@@ -139,13 +139,13 @@ void EditorViewport::paint(Graphics& g)
//int w = 30;
//int h = getHeight() - 2*(borderSize+2);
if (editorArray.size() > 0)
{
if (!editorArray[0]->getProcessor()->isSource())
g.drawImageAt(sourceDropImage, x, y);
} else {
//if (editorArray.size() > 0)
//{
//if (!editorArray[0]->getProcessor()->isSource())
// g.drawImageAt(sourceDropImage, x, y);
//} else {
g.drawImageAt(sourceDropImage, x, y);
}
//}
}
bool EditorViewport::isInterestedInDragSource(const SourceDetails& dragSourceDetails)
......@@ -279,8 +279,11 @@ void EditorViewport::itemDropped(const SourceDetails& dragSourceDetails)
void EditorViewport::clearSignalChain()
{
if (canEdit)
{
editorArray.clear();
//const MessageManagerLock mmLock; // prevent redraw while deleting
std::cout << "Clearing signal chain." << std::endl;
signalChainManager->clearSignalChain();
getProcessorGraph()->clearSignalChain();
......@@ -294,7 +297,7 @@ void EditorViewport::clearSignalChain()
}
//repaint();
repaint();
}
void EditorViewport::makeEditorVisible(GenericEditor* editor, bool highlight, bool updateSettings)
......
......@@ -439,8 +439,10 @@ bool UIComponent::perform(const InvocationInfo& info)
break;
}
case clearSignalChain:
{
getEditorViewport()->clearSignalChain();
break;
}
case showHelp:
std::cout << "SHOW ME SOME HELP!" << std::endl;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment