writeExpandedSettings();
m_populated = true;
- QTreeWidgetItem *pooltreeitem;
-
if (!m_console->preventInUseConnect())
return;
+ Freeze frz(*mp_treeWidget); /* disable updating*/
+
QStringList headerlist = (QStringList()
<< tr("Volume Name") << tr("Id") << tr("Status") << tr("Enabled") << tr("Bytes") << tr("Files")
<< tr("Jobs") << tr("Retention") << tr("Media Type") << tr("Slot") << tr("Use Duration")
settings.beginGroup("MediaListTreeExpanded");
QString query;
+ QTreeWidgetItem *pooltreeitem;
foreach (QString pool_listItem, m_console->pool_list) {
pooltreeitem = new QTreeWidgetItem(m_topItem);
pooltreeitem->setText(0, pool_listItem);
*/
void MediaList::writeExpandedSettings()
{
- QSettings settings(m_console->m_dir->name(), "bat");
- settings.beginGroup("MediaListTreeExpanded");
- int childcount = m_topItem->childCount();
- for (int cnt=0; cnt<childcount; cnt++) {
- QTreeWidgetItem *poolitem = m_topItem->child(cnt);
- settings.setValue(poolitem->text(0), poolitem->isExpanded());
+ if (m_topItem) {
+ QSettings settings(m_console->m_dir->name(), "bat");
+ settings.beginGroup("MediaListTreeExpanded");
+ int childcount = m_topItem->childCount();
+ for (int cnt=0; cnt<childcount; cnt++) {
+ QTreeWidgetItem *poolitem = m_topItem->child(cnt);
+ settings.setValue(poolitem->text(0), poolitem->isExpanded());
+ }
+ settings.endGroup();
}
- settings.endGroup();
}