Skip to content

Commit 6993946

Browse files
committed
fixed list control selection
updated documents
1 parent f7d837b commit 6993946

File tree

5 files changed

+17
-5
lines changed

5 files changed

+17
-5
lines changed

FluoRender_Manual.docx

-6.19 MB
Binary file not shown.

FluoRender_Tutorials.docx

368 KB
Binary file not shown.

Frequently Asked Questions.docx

14.3 KB
Binary file not shown.

fluorender/FluoRender/MeasureDlg.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -452,6 +452,7 @@ void RulerListCtrl::OnNameText(wxCommandEvent& event)
452452
Ruler* ruler = (*ruler_list)[m_editing_item];
453453
if (!ruler) return;
454454
ruler->SetName(str);
455+
SetText(m_editing_item, 0, str);
455456
m_view->RefreshGL();
456457
}
457458

@@ -469,6 +470,12 @@ void RulerListCtrl::OnColorChange(wxColourPickerEvent& event)
469470
Ruler* ruler = (*ruler_list)[m_editing_item];
470471
if (!ruler) return;
471472
ruler->SetColor(color);
473+
wxString str_color;
474+
str_color = wxString::Format("RGB(%d, %d, %d)",
475+
int(color.r()*255),
476+
int(color.g()*255),
477+
int(color.b()*255));
478+
SetText(m_editing_item, 1, str_color);
472479
m_view->RefreshGL();
473480
}
474481

fluorender/FluoRender/RecorderDlg.cpp

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ void KeyListCtrl::EndEdit(bool update)
322322

323323
void KeyListCtrl::OnEndSelection(wxListEvent &event)
324324
{
325-
EndEdit(false);
325+
EndEdit();
326326
}
327327

328328
void KeyListCtrl::OnFrameText(wxCommandEvent& event)
@@ -344,8 +344,10 @@ void KeyListCtrl::OnFrameText(wxCommandEvent& event)
344344
int index = interpolator->GetKeyIndex(int(id));
345345
str = m_frame_text->GetValue();
346346
double time;
347-
str.ToDouble(&time);
348-
interpolator->ChangeTime(index, time);
347+
if (str.ToDouble(&time))
348+
{
349+
interpolator->ChangeTime(index, time);
350+
}
349351
}
350352

351353
void KeyListCtrl::OnDurationText(wxCommandEvent& event)
@@ -367,8 +369,11 @@ void KeyListCtrl::OnDurationText(wxCommandEvent& event)
367369
int index = interpolator->GetKeyIndex(int(id));
368370
str = m_duration_text->GetValue();
369371
double duration;
370-
str.ToDouble(&duration);
371-
interpolator->ChangeDuration(index, duration);
372+
if (str.ToDouble(&duration))
373+
{
374+
interpolator->ChangeDuration(index, duration);
375+
SetText(m_editing_item, 2, str);
376+
}
372377
}
373378

374379
void KeyListCtrl::OnInterpoCmb(wxCommandEvent& event)

0 commit comments

Comments
 (0)