summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/widgets/textbox.cpp6
-rw-r--r--src/gui/widgets/textbox.h3
2 files changed, 7 insertions, 2 deletions
diff --git a/src/gui/widgets/textbox.cpp b/src/gui/widgets/textbox.cpp
index 0d2ac611e..905347f89 100644
--- a/src/gui/widgets/textbox.cpp
+++ b/src/gui/widgets/textbox.cpp
@@ -645,3 +645,9 @@ void TextBox::adjustSize()
setWidth(width + 1);
setHeight(font->getHeight() * CAST_S32(mTextRows.size()));
}
+
+void TextBox::setEditable(const bool editable)
+{
+ mEditable = editable;
+ mSelectable = editable;
+}
diff --git a/src/gui/widgets/textbox.h b/src/gui/widgets/textbox.h
index 0990fe56b..45a5169dc 100644
--- a/src/gui/widgets/textbox.h
+++ b/src/gui/widgets/textbox.h
@@ -241,8 +241,7 @@ class TextBox final : public Widget,
*
* @param editable True if the text box should be editable, false otherwise.
*/
- void setEditable(const bool editable)
- { mEditable = editable; }
+ void setEditable(const bool editable);
/**
* Adds a row of text to the end of the text.