Commit d412cfc7 authored by twanvl's avatar twanvl

Fixed: keyword expanding could hang if there is a keyword that matches "";

Fixed: drop down list now stays open after mouse out the second time it is used;
Fixed some typos in comments;
Disabled 'check updates' menu item for 0.3.5 release
parent a9ddd957
......@@ -479,6 +479,7 @@ String KeywordDatabase::expand(const String& text,
kw->match_re.GetMatch(&start_u, &len_u, 0);
size_t start = untagged_to_index(s, start_u, true),
end = untagged_to_index(s, start_u + len_u, true);
if (start == end) continue; // don't match empty keywords
result += s.substr(0, start);
// Split the keyword, set parameters in context
......
......@@ -138,6 +138,7 @@ void DropDownList::show(bool in_place, wxPoint pos, RealRect* rect) {
// show
if (selected_item == NO_SELECTION && itemCount() > 0) selected_item = 0; // select first item by default
mouse_down = false;
close_on_mouse_out = false;
Window::Show();
if (isRoot() && GetParent()->HasCapture()) {
// release capture on parent
......
......@@ -374,6 +374,7 @@ void SetWindow::onUpdateUI(wxUpdateUIEvent& ev) {
case ID_FILE_EXPORT_IMAGE: ev.Enable(!!current_panel->selectedCard()); break;
case ID_FILE_EXPORT_APPR: ev.Enable(set->game->isMagic()); break;
case ID_FILE_EXPORT_MWS: ev.Enable(set->game->isMagic()); break;
case ID_FILE_CHECK_UPDATES:ev.Enable(false); break; // no update checking in 0.3.5
case ID_FILE_EXIT:
// update for ID_FILE_RECENT done for a different id, because ID_FILE_RECENT may not be in the menu yet
updateRecentSets();
......
......@@ -257,7 +257,7 @@ void SymbolPointEditor::onLeftDClick(const Vector2D& pos, wxMouseEvent& ev) {
// select the new point
selectPoint(act->getNewPoint(), false);
selection = SELECTED_POINTS;
} else if (hovering == SELECTED_HANDLE && hover_handle.handle == HANDLE_MAIN) { //%%%%%%% ||/&&
} else if (hovering == SELECTED_HANDLE && hover_handle.handle == HANDLE_MAIN) {
// Delete point
selected_points.clear();
selectPoint(hover_handle.point, false);
......
......@@ -1298,15 +1298,6 @@ void TextValueEditor::clearWordListIndicators(RotatedDC& dc) {
void TextValueEditor::redrawWordListIndicators(bool toggling_dropdown) {
redrawSelection(selection_start_i, selection_end_i, dropDownShown() != toggling_dropdown);
/*//%%if (isCurrent()) {
// Hide caret
wxCaret* caret = editor().GetCaret();
if (caret->IsVisible()) caret->Hide();
}
drawWordListIndicators(*editor().overdrawDC(), true);
if (isCurrent()) {
showCaret();
}*/
}
void TextValueEditor::drawWordListIndicators(RotatedDC& dc, bool redrawing) {
......
......@@ -68,7 +68,7 @@ void writeUTF8(wxTextOutputStream& stream, const String& str);
#define RIGHT_SINGLE_QUOTE _('\u2019')
#define LEFT_DOUBLE_QUOTE _('\u201C')
#define RIGHT_DOUBLE_QUOTE _('\u201D')
#define CONNECTION_SPACE _('\uEB00') // in private use are, untags to ' '
#define CONNECTION_SPACE _('\uEB00') // in private use area, untags to ' '
#else
#define LEFT_ANGLE_BRACKET _("<")
#define RIGHT_ANGLE_BRACKET _(">")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment