diff --git a/rvcmds.sh b/rvcmds.sh index df8dda9d1..31bf21b3a 100755 --- a/rvcmds.sh +++ b/rvcmds.sh @@ -79,7 +79,7 @@ RV_BUILD_PARALLELISM="${RV_BUILD_PARALLELISM:-$(python3 -c 'import os; print(os. # ALIASES: Basic commands -alias rvsetup="SETUPTOOLS_USE_DISTUTILS=${SETUPTOOLS_USE_DISTUTILS} python3 -m pip install --user --upgrade -r ${RV_HOME}/requirements.txt --break-system-packages" +alias rvsetup="SETUPTOOLS_USE_DISTUTILS=${SETUPTOOLS_USE_DISTUTILS} python3 -m pip install --user --upgrade -r ${RV_HOME}/requirements.txt" alias rvcfg="cmake -B ${RV_BUILD} -G \"${CMAKE_GENERATOR}\" ${CMAKE_WIN_ARCH} -DCMAKE_BUILD_TYPE=Release -DRV_DEPS_QT5_LOCATION=${QT_HOME} -DRV_DEPS_WIN_PERL_ROOT=${WIN_PERL}" alias rvcfgd="cmake -B ${RV_BUILD} -G \"${CMAKE_GENERATOR}\" ${CMAKE_WIN_ARCH} -DCMAKE_BUILD_TYPE=Debug -DRV_DEPS_QT5_LOCATION=${QT_HOME} -DRV_DEPS_WIN_PERL_ROOT=${WIN_PERL}" alias rvbuildt="cmake --build ${RV_BUILD} --config Release -v --parallel=${RV_BUILD_PARALLELISM} --target " diff --git a/src/plugins/rv-packages/annotate/annotate_mode.mu b/src/plugins/rv-packages/annotate/annotate_mode.mu index 4f67efbb5..b78b3ed91 100644 --- a/src/plugins/rv-packages/annotate/annotate_mode.mu +++ b/src/plugins/rv-packages/annotate/annotate_mode.mu @@ -622,9 +622,22 @@ class: AnnotateMinorMode : MinorMode populateAnnotationList(); } - method: getTextFromClipboard(string;) + method: getTextFromClipboard (void; Event event) { + // Getting text directly from the users clipboard + let text = commands.getTextFromClipboard(); + if (text == "") { + print("WARNING: Clipboard is empty"); + + } else { + _textPlacementMode = true; + + for (int i = 0; i < text.size(); i++) + _textBuffer.push_back(text[i]); + + setText(_textBuffer); + } } //---------------------------------------------------------------------- @@ -1110,12 +1123,6 @@ class: AnnotateMinorMode : MinorMode _toolSliderLabel.setText(if d.sliderName eq nil then "Opacity" else d.sliderName); } - method: getClipboard(string;) - { - print("DEBUG: Getting clipboard from Mu file"); - commands.getTextFromClipboard(); - } - method: locationChangedSlot (void; Qt.DockWidgetArea area) { _dockArea = area; @@ -2159,14 +2166,14 @@ class: AnnotateMinorMode : MinorMode ("key-down--backspace", backwardDeleteChar, "Back Char"), ("key-down--delete", backwardDeleteChar, "Back Char"), ("key-down--control--a", killLine, ""), - ("key-down--meta--backspace", backwardsKillWord, ""), + //("key-down--meta--backspace", backwardsKillWord, ""), ("key-down--alt--backspace", backwardsKillWord, ""), ("key-down--shift--backspace", backwardsKillWord, ""), - ("key-down--control--backspace", backwardsKillWord, ""), + //("key-down--control--backspace", backwardsKillWord, ""), + ("key-down--meta--backspace", getTextFromClipboard, ""), ("key-down--meta--a", killLine, ""), ("key-down--alt--a", killLine, ""), - // ("key-down--space", insertChar, ""), - ("key-down--space", getClipboard, ""), + ("key-down--space", insertChar, ""), ("key-down--enter", insertNL, ""), ("key-down--control--enter", commitText(false,), ""), ("key-down--meta--enter", commitText(false,), ""),