Browse Source

LineEdit: don't undo uneditable LineEdit

Poommetee Ketson 8 năm trước cách đây
mục cha
commit
9be034a8cd
1 tập tin đã thay đổi với 3 bổ sung1 xóa
  1. 3 1
      scene/gui/line_edit.cpp

+ 3 - 1
scene/gui/line_edit.cpp

@@ -1191,7 +1191,9 @@ void LineEdit::menu_option(int p_option) {
 			select_all();
 		} break;
 		case MENU_UNDO: {
-			undo();
+			if (editable) {
+				undo();
+			}
 		} break;
 	}
 }