+void LayerWidget::Reload(void)
+{
+ list->clear();
+
+ for(int i=0; i<Global::numLayers; i++)
+ {
+ QListWidgetItem * qlwi = new QListWidgetItem();
+ LayerItemWidget * liw = new LayerItemWidget(Global::layerName[i].c_str(), Global::layerHidden[i], Global::layerLocked[i], qlwi);
+ list->insertItem(0, qlwi);
+ list->setItemWidget(qlwi, liw);
+
+ // Set up SIGNAL/SLOTs for this LayerItemWidget
+ connect(liw, SIGNAL(HideToggled(QListWidgetItem *, bool)), this, SLOT(HandleHideToggle(QListWidgetItem *, bool)));
+ connect(liw, SIGNAL(LockToggled(QListWidgetItem *, bool)), this, SLOT(HandleLockToggle(QListWidgetItem *, bool)));
+ }
+
+ int layer = (Global::numLayers - Global::activeLayer) - 1;
+ list->setCurrentRow(layer, QItemSelectionModel::SelectCurrent);
+ SetButtonStates();
+}
+
+