MCPcopy Create free account
hub / github.com/DISTRHO/Cardinal / Cut

Method Cut

plugins/Cardinal/src/DearImGuiColorTextEditor/TextEditor.cpp:1933–1956  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1931}
1932
1933void TextEditor::Cut()
1934{
1935 if (IsReadOnly())
1936 {
1937 Copy();
1938 }
1939 else
1940 {
1941 if (HasSelection())
1942 {
1943 UndoRecord u;
1944 u.mBefore = mState;
1945 u.mRemoved = GetSelectedText();
1946 u.mRemovedStart = mState.mSelectionStart;
1947 u.mRemovedEnd = mState.mSelectionEnd;
1948
1949 Copy();
1950 DeleteSelection();
1951
1952 u.mAfter = mState;
1953 AddUndo(u);
1954 }
1955 }
1956}
1957
1958void TextEditor::Paste()
1959{

Callers 1

cutMethod · 0.80

Calls 1

HasSelectionFunction · 0.85

Tested by

no test coverage detected