Skip to content

Commit

Permalink
Move changes to correct folder
Browse files Browse the repository at this point in the history
  • Loading branch information
chxmberland committed Jul 29, 2024
1 parent 5256b0b commit 817177a
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 12 deletions.
2 changes: 1 addition & 1 deletion rvcmds.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 "
Expand Down
29 changes: 18 additions & 11 deletions src/plugins/rv-packages/annotate/annotate_mode.mu
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

//----------------------------------------------------------------------
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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,), ""),
Expand Down

0 comments on commit 817177a

Please sign in to comment.