Skip to content

Commit b25ea3c

Browse files
committed
Show wait cursor when importing a module
1 parent bd2f181 commit b25ea3c

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

Source/PythonProcessor.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -478,6 +478,8 @@ bool PythonProcessor::importModule()
478478

479479
LOGC("Importing Python module from ", scriptPath.toRawUTF8());
480480

481+
MouseCursor::showWaitCursor();
482+
481483
try
482484
{
483485
// Clear for new class
@@ -505,6 +507,7 @@ bool PythonProcessor::importModule()
505507

506508
editorPtr->setPathLabelText(moduleName);
507509
moduleReady = true;
510+
MouseCursor::hideWaitCursor();
508511
return true;
509512
}
510513

@@ -513,7 +516,7 @@ bool PythonProcessor::importModule()
513516
String errText = "Failed to import Python module " + moduleName;
514517
LOGE(errText);
515518
handlePythonException("Import Failed!", errText, e);
516-
519+
MouseCursor::hideWaitCursor();
517520
return false;
518521
}
519522
}

Source/PythonProcessor.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,9 @@ class PythonProcessor : public GenericProcessor
101101
Visualizer plugins typically use this method to send data to the canvas for display purposes */
102102
void process(AudioBuffer<float>& buffer) override;
103103

104-
// /** Handles events received by the processor
105-
// Called automatically for each received event whenever checkForEvents() is called from
106-
// the plugin's process() method */
104+
/** Handles events received by the processor
105+
Called automatically for each received event whenever checkForEvents() is called from
106+
the plugin's process() method */
107107
void handleTTLEvent(TTLEventPtr event) override;
108108

109109
/** Handles spikes received by the processor
@@ -115,6 +115,7 @@ class PythonProcessor : public GenericProcessor
115115
// Called automatically whenever a broadcast message is sent through the signal chain */
116116
// void handleBroadcastMessage(String message) override;
117117

118+
/**Add events from python to C++. Bound to Python as an embedded module*/
118119
void addPythonEvent(int line, bool state);
119120

120121
void triggerTTLEvent(StringTTL TTLmsg, juce::int64 sampleNum);

0 commit comments

Comments
 (0)