Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/prusa3d/PrusaSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/xs
diff options
context:
space:
mode:
authorYuSanka <yusanka@gmail.com>2018-05-11 10:53:35 +0300
committerYuSanka <yusanka@gmail.com>2018-05-11 10:53:35 +0300
commite91ebddeea4da1f6062546ee354573119c22f89b (patch)
tree03a0cc22d0ba97d55c4e58ff58f06f535073cf32 /xs
parent0fc422544bc366dac548abc6d291c99ae76d8819 (diff)
Added possibility of select all TextCtrl context using Ctrl+A
Diffstat (limited to 'xs')
-rw-r--r--xs/src/slic3r/GUI/Field.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/xs/src/slic3r/GUI/Field.cpp b/xs/src/slic3r/GUI/Field.cpp
index 623e20b45..0fcf480e3 100644
--- a/xs/src/slic3r/GUI/Field.cpp
+++ b/xs/src/slic3r/GUI/Field.cpp
@@ -194,6 +194,14 @@ namespace Slic3r { namespace GUI {
temp->Bind(wxEVT_TEXT, ([this](wxCommandEvent) { on_change_field(); }), temp->GetId());
+ // select all text using Ctrl+A
+ temp->Bind(wxEVT_CHAR, ([temp](wxKeyEvent& event)
+ {
+ if (wxGetKeyState(wxKeyCode('A')) && wxGetKeyState(WXK_CONTROL))
+ temp->SetSelection(-1, -1); //select all
+ event.Skip();
+ }));
+
// recast as a wxWindow to fit the calling convention
window = dynamic_cast<wxWindow*>(temp);
}