Implement unique IDs and card linking

This commit is contained in:
GenevensiS
2025-08-11 16:17:13 +02:00
committed by GitHub
parent 13406b946c
commit 3bf9de18b1
100 changed files with 2432 additions and 1219 deletions
+9 -9
View File
@@ -482,13 +482,13 @@ bool TextValueEditor::onChar(wxKeyEvent& ev) {
}
}
return true;
default:
#if defined UNICODE
// I think in theory this works because the UnicodeKey is intended to be only character values.
// See the following link for pretty much an exact example of this type of handling.
// https://docs.wxwidgets.org/3.0/classwx_key_event.html#a3dccc5a254770931e5d8066ef47e7fb0
// Most of the special keys (<32) are handled in the case structure above anyways.
// I tried to replicate the Numpad issue mentioned below, but couldn't - so unclear if that's still relevant.
default:
#if defined UNICODE
// I think in theory this works because the UnicodeKey is intended to be only character values.
// See the following link for pretty much an exact example of this type of handling.
// https://docs.wxwidgets.org/3.0/classwx_key_event.html#a3dccc5a254770931e5d8066ef47e7fb0
// Most of the special keys (<32) are handled in the case structure above anyways.
// I tried to replicate the Numpad issue mentioned below, but couldn't - so unclear if that's still relevant.
if (ev.GetUnicodeKey() >= WXK_SPACE) {
#elif defined __WXMSW__
if (ev.GetKeyCode() >= _(' ') && ev.GetKeyCode() == (int)ev.GetRawKeyCode()) {
@@ -822,7 +822,7 @@ bool TextValueEditor::hasFormat(int type) const {
case ID_FORMAT_BOLD:
return is_in_tag(value().value(), _("<b"), selection_start_i, selection_end_i);
case ID_FORMAT_ITALIC:
return is_in_tag(value().value(), _("<i"), selection_start_i, selection_end_i);
return is_in_tag(value().value(), _("<i"), selection_start_i, selection_end_i);
case ID_FORMAT_UNDERLINE:
return is_in_tag(value().value(), _("<u"), selection_start_i, selection_end_i);
case ID_FORMAT_SYMBOL:
@@ -850,7 +850,7 @@ void TextValueEditor::doFormat(int type) {
case ID_FORMAT_ITALIC: {
addAction(toggle_format_action(valueP(), _("i"), selection_start_i, selection_end_i, selection_start, selection_end, _("Italic")));
break;
}
}
case ID_FORMAT_UNDERLINE: {
addAction(toggle_format_action(valueP(), _("u"), selection_start_i, selection_end_i, selection_start, selection_end, _("Underline")));
break;