summaryrefslogtreecommitdiff
path: root/src/gui/intlGUIEditBox.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/intlGUIEditBox.cpp')
-rw-r--r--src/gui/intlGUIEditBox.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/gui/intlGUIEditBox.cpp b/src/gui/intlGUIEditBox.cpp
index 8b0f10721..8c661b9f3 100644
--- a/src/gui/intlGUIEditBox.cpp
+++ b/src/gui/intlGUIEditBox.cpp
@@ -354,8 +354,7 @@ bool intlGUIEditBox::processKey(const SEvent& event)
break;
case KEY_KEY_X:
// cut to the clipboard
- if (!PasswordBox && Operator && MarkBegin != MarkEnd)
- {
+ if (!PasswordBox && Operator && MarkBegin != MarkEnd) {
const s32 realmbgn = MarkBegin < MarkEnd ? MarkBegin : MarkEnd;
const s32 realmend = MarkBegin < MarkEnd ? MarkEnd : MarkBegin;
@@ -364,8 +363,7 @@ bool intlGUIEditBox::processKey(const SEvent& event)
sc = Text.subString(realmbgn, realmend - realmbgn).c_str();
Operator->copyToClipboard(sc.c_str());
- if (IsEnabled)
- {
+ if (IsEnabled && m_writable) {
// delete
core::stringw s;
s = Text.subString(0, realmbgn);
@@ -380,7 +378,7 @@ bool intlGUIEditBox::processKey(const SEvent& event)
}
break;
case KEY_KEY_V:
- if ( !IsEnabled )
+ if (!IsEnabled || !m_writable)
break;
// paste from the clipboard
@@ -636,7 +634,7 @@ bool intlGUIEditBox::processKey(const SEvent& event)
break;
case KEY_BACK:
- if ( !this->IsEnabled )
+ if (!this->IsEnabled || !m_writable)
break;
if (!Text.empty()) {
@@ -675,7 +673,7 @@ bool intlGUIEditBox::processKey(const SEvent& event)
}
break;
case KEY_DELETE:
- if ( !this->IsEnabled )
+ if (!this->IsEnabled || !m_writable)
break;
if (!Text.empty()) {
@@ -1351,7 +1349,7 @@ s32 intlGUIEditBox::getLineFromPos(s32 pos)
void intlGUIEditBox::inputChar(wchar_t c)
{
- if (!IsEnabled)
+ if (!IsEnabled || !m_writable)
return;
if (c != 0)