diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2013-09-18 16:21:43 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2013-09-19 17:03:27 +0200 |
commit | 68035ffc3e94af0c3cef600a65fa301efd3045af (patch) | |
tree | b717c5288a5fd186e5e06e1211bc3cf31a1b7946 /sc | |
parent | 268c33e1b32a407fb3db66c41cbb9bf15e9422a2 (diff) |
select maximum one opencl device
Change-Id: If06caaa6b39131359ffc81fadad200c8cf8fe24a
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/ui/optdlg/calcoptionsdlg.cxx | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/sc/source/ui/optdlg/calcoptionsdlg.cxx b/sc/source/ui/optdlg/calcoptionsdlg.cxx index 9607fb68e00e..eefb7f60e2a8 100644 --- a/sc/source/ui/optdlg/calcoptionsdlg.cxx +++ b/sc/source/ui/optdlg/calcoptionsdlg.cxx @@ -204,6 +204,8 @@ void ScCalcOptionsDialog::fillOpenclList() OUString aStoredDevice = maConfig.maOpenCLDevice; + SvTreeListEntry* pSelectedEntry = NULL; + sc::FormulaGroupInterpreter::fillOpenCLInfo(maPlatformInfo); for(std::vector<sc::OpenclPlatformInfo>::iterator it = maPlatformInfo.begin(), itEnd = maPlatformInfo.end(); it != itEnd; ++it) @@ -215,13 +217,18 @@ void ScCalcOptionsDialog::fillOpenclList() SvTreeListEntry* pEntry = mpOpenclInfoList->InsertEntry(aDeviceId); if(aDeviceId == aStoredDevice) { - mpOpenclInfoList->GetModel()->GetView(0)->Select(pEntry); + pSelectedEntry = pEntry; } pEntry->SetUserData(&(*itr)); } } mpOpenclInfoList->SetUpdateMode(true); + mpOpenclInfoList->GetModel()->GetView(0)->SelectAll(false, false); + if(pSelectedEntry) + { + mpOpenclInfoList->GetModel()->GetView(0)->Select(pSelectedEntry); + } SelectedDeviceChanged(); } |