Skip to content

Commit 4e54a7f

Browse files
mercury233Copilot
andauthored
Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
1 parent 45bfe31 commit 4e54a7f

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

gframe/event_handler.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2093,11 +2093,9 @@ bool ClientField::OnCommonEvent(const irr::SEvent& event) {
20932093
}
20942094
case irr::KEY_KEY_V: {
20952095
irr::gui::IGUIElement* focus = mainGame->env->getFocus();
2096-
if(focus && focus->getType() == irr::gui::EGUIET_EDIT_BOX
2096+
if(focus && focus->hasType(irr::gui::EGUIET_EDIT_BOX)
20972097
&& !event.KeyInput.PressedDown && event.KeyInput.Control) {
2098-
irr::core::stringw t(focus->getText());
2099-
t.trim();
2100-
focus->setText(t.c_str());
2098+
mainGame->TrimText(focus);
21012099
}
21022100
break;
21032101
}

0 commit comments

Comments
 (0)