diff --git a/common/tool/tool_manager.cpp b/common/tool/tool_manager.cpp index f4c9e83324..510c934ae4 100644 --- a/common/tool/tool_manager.cpp +++ b/common/tool/tool_manager.cpp @@ -363,7 +363,11 @@ bool TOOL_MANAGER::doRunAction( const TOOL_ACTION& aAction, bool aNow, const std while( synchronousControl == STS_RUNNING ) { - wxYield(); + wxYield(); // Needed to honor mouse (and other) events during editing + wxMilliSleep( 1 ); // Needed to avoid 100% use of one cpu core. + // The sleeping time must be must be small to avoid + // noticeable lag in mouse and editing events + // (1 to 5 ms is a good value) } retVal = synchronousControl != STS_CANCELLED;