206{
207
208 QString
ct = cb->currentText();
211
212 bool save = cb->blockSignals(
true);
213
214 cb->clear();
215
216 bool enabled = false;
219 cb->setEnabled(false);
220 } else {
221 cb->addItems(l);
222
223 int i = restoredSelection.isEmpty() ? -1 : cb->findText(restoredSelection);
224 if (i<0)
225 i =
ct.isEmpty() ? -1 : cb->findText(ct);
226 restoredSelection = "";
227
228 if (i>=0) {
229 cb->setCurrentIndex(i);
230 } else {
231
232
233 int i_vp1(-1), i_atlas(-1);
234 for (int j = 0; j <cb->count();++j) {
235 if (i_vp1==-1&&cb->itemText(j).contains("vp1",Qt::CaseInsensitive))
236 i_vp1 = j;
237 if (i_atlas==-1&&cb->itemText(j).contains("atlas",Qt::CaseInsensitive))
238 i_atlas = j;
239 }
240 if (i_vp1>=0)
241 cb->setCurrentIndex(i_vp1);
242 else if (i_atlas>=0)
243 cb->setCurrentIndex(i_atlas);
244 }
246 enabled = true;
247 cb->setEnabled(true);
248 }
249
250 if (!save)
251 cb->blockSignals(false);
252 return enabled;
253}
static const QString noneAvailString
l
Printing final latex table to .tex output file.