mirror of
https://git.eden-emu.dev/eden-emu/eden
synced 2026-04-26 20:19:01 +02:00
[desktop] Fix 2 mod manager bugs (#3884)
- Multi-import would show duplicates of a mod if it had both exefs and romfs - Import from folder would crash on some single mods Signed-off-by: crueter <crueter@eden-emu.dev> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3884 Reviewed-by: Lizzie <lizzie@eden-emu.dev> Reviewed-by: MaranBr <maranbr@eden-emu.dev>
This commit is contained in:
parent
048d02e5b4
commit
91058d7383
4 changed files with 13 additions and 8 deletions
|
|
@ -31,11 +31,10 @@ ModSelectDialog::ModSelectDialog(const QStringList& mods, QWidget* parent)
|
|||
}
|
||||
|
||||
ui->treeView->expandAll();
|
||||
ui->treeView->resizeColumnToContents(0);
|
||||
|
||||
int rows = item_model->rowCount();
|
||||
int height =
|
||||
ui->treeView->contentsMargins().top() * 4 + ui->treeView->contentsMargins().bottom() * 4;
|
||||
4 + ui->treeView->contentsMargins().top() * 4 + ui->treeView->contentsMargins().bottom() * 4;
|
||||
int width = 0;
|
||||
|
||||
for (int i = 0; i < rows; ++i) {
|
||||
|
|
@ -46,7 +45,7 @@ ModSelectDialog::ModSelectDialog(const QStringList& mods, QWidget* parent)
|
|||
width +=
|
||||
ui->treeView->contentsMargins().left() * 4 + ui->treeView->contentsMargins().right() * 4;
|
||||
ui->treeView->setMinimumHeight(qMin(height, 600));
|
||||
ui->treeView->setMinimumWidth(qMin(width, 700));
|
||||
ui->treeView->setMinimumWidth(qMax(width, 540));
|
||||
adjustSize();
|
||||
|
||||
connect(this, &QDialog::accepted, this, [this]() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue