Kaydet (Commit) d156dd49 authored tarafından Tor Lillqvist's avatar Tor Lillqvist

Update the white or black list when editing an entry

Must be careful to re-select the logically same entry even after it actually
has been removed and the edited on inserted.

Change-Id: Id19f7845fadbc018affab7a6cb6b421ed9170297
üst 0485355e
......@@ -308,19 +308,23 @@ void ScCalcOptionsDialog::fillOpenCLList()
namespace {
void fillListBox(ListBox* pListBox, const ScCalcConfig::OpenCLImplSet& rSet)
OUString format(const ScCalcConfig::OpenCLImpl& rImpl)
{
return (rImpl.maOS + " " +
rImpl.maOSVersion + " " +
rImpl.maPlatformVendor + " " +
rImpl.maDevice + " " +
rImpl.maDriverVersion);
}
void fillListBox(ListBox* pListBox, const ScCalcConfig::OpenCLImplSet& rSet)
{
pListBox->SetUpdateMode(false);
pListBox->Clear();
for (auto i = rSet.cbegin(); i != rSet.cend(); ++i)
{
pListBox->InsertEntry((*i).maOS + " " +
(*i).maOSVersion + " " +
(*i).maPlatformVendor + " " +
(*i).maDevice + " " +
(*i).maDriverVersion,
LISTBOX_APPEND);
pListBox->InsertEntry(format(*i), LISTBOX_APPEND);
}
pListBox->SetUpdateMode(true);
......@@ -799,6 +803,9 @@ void ScCalcOptionsDialog::EditFieldValueChanged(Control *pCtrl)
rSet.erase(impl);
rSet.insert(newImpl);
fillListBox(mpOpenCLWhiteAndBlackListBox, rSet);
mpOpenCLWhiteAndBlackListBox->SelectEntry(format(newImpl));
}
}
......
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