Double Click bug fix

* Double click text selection for transfer to QSO record fields
pull/1/head
Arvo Järve 2013-05-20 17:51:52 -05:00 zatwierdzone przez David Freese
rodzic 9dd563a8af
commit fe315583d2
2 zmienionych plików z 32 dodań i 16 usunięć

Wyświetl plik

@ -118,6 +118,7 @@ extern Fl_Input2 *inpCall2;
extern Fl_Input2 *inpCall3; extern Fl_Input2 *inpCall3;
extern Fl_Input2 *inpCall4; extern Fl_Input2 *inpCall4;
extern Fl_Group *QsoInfoFrame1B;
extern Fl_Group *qsoFrameView; extern Fl_Group *qsoFrameView;
extern Fl_Group *QsoButtonFrame; extern Fl_Group *QsoButtonFrame;
extern Fl_Group *QsoInfoFrame; extern Fl_Group *QsoInfoFrame;

Wyświetl plik

@ -517,6 +517,19 @@ void FTextRX::handle_qso_data(int start, int end)
Fl_Input* target = 0; Fl_Input* target = 0;
if (QsoInfoFrame1B->visible()) {
if (call.match(s)) { // point p to substring
const regmatch_t& offsets = call.suboff()[1];
p = s + offsets.rm_so;
*(s + offsets.rm_eo) = '\0';
inpCall->value(p);
inpCall->do_callback();
} else {
inpXchgIn->position(inpXchgIn->size());
if (inpXchgIn->size()) inpXchgIn->insert(" ", 1);
inpXchgIn->insert(s);
}
} else {
if (rst.match(s)) if (rst.match(s))
target = inpRstIn; target = inpRstIn;
else if (loc.match(s)) else if (loc.match(s))
@ -534,7 +547,9 @@ void FTextRX::handle_qso_data(int start, int end)
target->value(p); target->value(p);
target->do_callback(); target->do_callback();
}
free(s); free(s);
restoreFocus(NULL); restoreFocus(NULL);
} }