mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 04:57:00 -04:00
"insert parameter" and "user parameter" buttons now work.
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@271 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
@@ -218,8 +218,8 @@ void TextValueEditor::onLoseFocus() {
|
||||
assert(caret);
|
||||
if (caret->IsVisible()) caret->Hide();
|
||||
// hide selection
|
||||
selection_start = selection_end = 0;
|
||||
selection_start_i = selection_end_i = 0;
|
||||
//selection_start = selection_end = 0;
|
||||
//selection_start_i = selection_end_i = 0;
|
||||
}
|
||||
|
||||
bool TextValueEditor::onContextMenu(IconMenu& m, wxContextMenuEvent& ev) {
|
||||
@@ -478,6 +478,9 @@ void TextValueEditor::showCaret() {
|
||||
if (!caret->IsVisible()) caret->Show();
|
||||
}
|
||||
|
||||
void TextValueEditor::insert(const String& text, const String& action_name) {
|
||||
replaceSelection(text, action_name);
|
||||
}
|
||||
void TextValueEditor::replaceSelection(const String& replacement, const String& name) {
|
||||
if (replacement.empty() && selection_start == selection_end) {
|
||||
// no text selected, nothing to delete
|
||||
|
||||
Reference in New Issue
Block a user