No end in sight :<
This commit is contained in:
		@@ -175,6 +175,7 @@ void OneSixModEditDialog::on_moveLibraryUpBtn_clicked()
 | 
			
		||||
	order[ourId] = ourNewOrder;
 | 
			
		||||
	order[sortedOrder[sortedOrders[ourIndex - 1]]] = ourOrder;
 | 
			
		||||
 | 
			
		||||
	// FIXME: why is GUI code doing this in particular? why isn't this part of a model?
 | 
			
		||||
	if (!OneSixVersionBuilder::writeOverrideOrders(order, m_inst))
 | 
			
		||||
	{
 | 
			
		||||
		QMessageBox::critical(this, tr("Error"), tr("Couldn't save the new order"));
 | 
			
		||||
@@ -185,6 +186,8 @@ void OneSixModEditDialog::on_moveLibraryUpBtn_clicked()
 | 
			
		||||
		ui->libraryTreeView->selectionModel()->select(m_version->index(ourRow - 1), QItemSelectionModel::SelectCurrent);
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// FIXME: WHY IS THIS DUPLICATED?
 | 
			
		||||
void OneSixModEditDialog::on_moveLibraryDownBtn_clicked()
 | 
			
		||||
{
 | 
			
		||||
	QMap<QString, int> order = getExistingOrder();
 | 
			
		||||
@@ -212,6 +215,7 @@ void OneSixModEditDialog::on_moveLibraryDownBtn_clicked()
 | 
			
		||||
	order[ourId] = ourNewOrder;
 | 
			
		||||
	order[sortedOrder[sortedOrders[ourIndex + 1]]] = ourOrder;
 | 
			
		||||
 | 
			
		||||
	// FIXME: why is GUI code doing this in particular? why isn't this part of a model?
 | 
			
		||||
	if (!OneSixVersionBuilder::writeOverrideOrders(order, m_inst))
 | 
			
		||||
	{
 | 
			
		||||
		QMessageBox::critical(this, tr("Error"), tr("Couldn't save the new order"));
 | 
			
		||||
 
 | 
			
		||||
@@ -130,6 +130,10 @@ void OneSixVersionBuilder::buildInternal(const bool onlyVanilla, const QStringLi
 | 
			
		||||
	} while(0);
 | 
			
		||||
 | 
			
		||||
	// some final touches
 | 
			
		||||
	finalizeVersion();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void OneSixVersionBuilder::finalizeVersion()
 | 
			
		||||
{
 | 
			
		||||
	if (m_version->assets.isEmpty())
 | 
			
		||||
	{
 | 
			
		||||
@@ -155,7 +159,6 @@ void OneSixVersionBuilder::buildInternal(const bool onlyVanilla, const QStringLi
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void OneSixVersionBuilder::readJsonAndApply(const QJsonObject &obj)
 | 
			
		||||
{
 | 
			
		||||
 
 | 
			
		||||
@@ -41,6 +41,7 @@ private:
 | 
			
		||||
 | 
			
		||||
	void buildInternal(const bool onlyVanilla, const QStringList &external);
 | 
			
		||||
	void readJsonAndApply(const QJsonObject &obj);
 | 
			
		||||
	void finalizeVersion();
 | 
			
		||||
 | 
			
		||||
	VersionFile parseJsonFile(const QFileInfo &fileInfo, const bool requireOrder, bool isFTB = false);
 | 
			
		||||
};
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user