From 3fadccc715922b9abc14164c6442dab76d828be6 Mon Sep 17 00:00:00 2001 From: DarkPhoenix Date: Mon, 26 Feb 2024 06:25:07 +0600 Subject: [PATCH] Select all after setting focus as an attempt to fix input box not selecting everything under windows --- gui/builtinContextMenus/droneSplitStack.py | 2 +- gui/builtinContextMenus/implantSetSave.py | 2 +- gui/builtinContextMenus/itemAmountChange.py | 2 +- gui/builtinContextMenus/itemProjectionRange.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/gui/builtinContextMenus/droneSplitStack.py b/gui/builtinContextMenus/droneSplitStack.py index ce82c2c79f..8d54f17743 100644 --- a/gui/builtinContextMenus/droneSplitStack.py +++ b/gui/builtinContextMenus/droneSplitStack.py @@ -65,7 +65,6 @@ def __init__(self, parent, value): self.input = wx.TextCtrl(self, wx.ID_ANY, style=wx.TE_PROCESS_ENTER) self.input.SetValue(str(value)) - self.input.SelectAll() bSizer1.Add(self.input, 0, wx.LEFT | wx.RIGHT | wx.EXPAND, 15) @@ -76,6 +75,7 @@ def __init__(self, parent, value): bSizer1.Add(bSizer3, 0, wx.ALL | wx.EXPAND, 10) self.input.SetFocus() + self.input.SelectAll() self.input.Bind(wx.EVT_CHAR, self.onChar) self.input.Bind(wx.EVT_TEXT_ENTER, self.processEnter) self.SetSizer(bSizer1) diff --git a/gui/builtinContextMenus/implantSetSave.py b/gui/builtinContextMenus/implantSetSave.py index 3083e3d355..8e2fd705c7 100644 --- a/gui/builtinContextMenus/implantSetSave.py +++ b/gui/builtinContextMenus/implantSetSave.py @@ -59,7 +59,6 @@ def __init__(self, parent, value): else: value = str(value) self.input.SetValue(value) - self.input.SelectAll() bSizer1.Add(self.input, 0, wx.LEFT | wx.RIGHT | wx.EXPAND, 15) @@ -70,6 +69,7 @@ def __init__(self, parent, value): bSizer1.Add(bSizer3, 0, wx.ALL | wx.EXPAND, 10) self.input.SetFocus() + self.input.SelectAll() self.input.Bind(wx.EVT_TEXT_ENTER, self.processEnter) self.SetSizer(bSizer1) self.CenterOnParent() diff --git a/gui/builtinContextMenus/itemAmountChange.py b/gui/builtinContextMenus/itemAmountChange.py index 676cc2c7ab..e68229868d 100644 --- a/gui/builtinContextMenus/itemAmountChange.py +++ b/gui/builtinContextMenus/itemAmountChange.py @@ -108,7 +108,6 @@ def __init__(self, parent, value, limits=None): self.input = wx.TextCtrl(self, wx.ID_ANY, style=wx.TE_PROCESS_ENTER) self.input.SetValue(str(value)) - self.input.SelectAll() bSizer1.Add(self.input, 0, wx.LEFT | wx.RIGHT | wx.EXPAND, 15) @@ -119,6 +118,7 @@ def __init__(self, parent, value, limits=None): bSizer1.Add(bSizer3, 0, wx.ALL | wx.EXPAND, 10) self.input.SetFocus() + self.input.SelectAll() self.input.Bind(wx.EVT_CHAR, self.onChar) self.input.Bind(wx.EVT_TEXT_ENTER, self.processEnter) self.SetSizer(bSizer1) diff --git a/gui/builtinContextMenus/itemProjectionRange.py b/gui/builtinContextMenus/itemProjectionRange.py index 9edc329cd8..77d2c7498e 100644 --- a/gui/builtinContextMenus/itemProjectionRange.py +++ b/gui/builtinContextMenus/itemProjectionRange.py @@ -94,7 +94,6 @@ def __init__(self, parent, value): value = int(value) value = str(value) self.input.SetValue(value) - self.input.SelectAll() bSizer1.Add(self.input, 0, wx.LEFT | wx.RIGHT | wx.EXPAND, 15) @@ -105,6 +104,7 @@ def __init__(self, parent, value): bSizer1.Add(bSizer3, 0, wx.ALL | wx.EXPAND, 10) self.input.SetFocus() + self.input.SelectAll() self.input.Bind(wx.EVT_CHAR, self.onChar) self.input.Bind(wx.EVT_TEXT_ENTER, self.processEnter) self.SetSizer(bSizer1)