Moved the export modlist out of the sub-menu
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
parent
d88fb266a5
commit
89230c4f8a
@ -70,15 +70,15 @@
|
|||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="WideBar" name="actionsToolbar">
|
<widget class="WideBar" name="actionsToolbar">
|
||||||
<property name="useDefaultAction" stdset="0">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
<string>Actions</string>
|
<string>Actions</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="toolButtonStyle">
|
<property name="toolButtonStyle">
|
||||||
<enum>Qt::ToolButtonTextOnly</enum>
|
<enum>Qt::ToolButtonTextOnly</enum>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="useDefaultAction" stdset="0">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
<attribute name="toolBarArea">
|
<attribute name="toolBarArea">
|
||||||
<enum>RightToolBarArea</enum>
|
<enum>RightToolBarArea</enum>
|
||||||
</attribute>
|
</attribute>
|
||||||
@ -171,6 +171,17 @@
|
|||||||
<string>Try to check or update all selected resources (all resources if none are selected)</string>
|
<string>Try to check or update all selected resources (all resources if none are selected)</string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
|
<action name="actionExportMetadata">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Export modlist</string>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Export mod's metadata to text</string>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
</widget>
|
</widget>
|
||||||
<customwidgets>
|
<customwidgets>
|
||||||
<customwidget>
|
<customwidget>
|
||||||
|
@ -112,10 +112,6 @@ ModFolderPage::ModFolderPage(BaseInstance* inst, std::shared_ptr<ModFolderModel>
|
|||||||
connect(actionRemoveItemMetadata, &QAction::triggered, this, &ModFolderPage::deleteModMetadata);
|
connect(actionRemoveItemMetadata, &QAction::triggered, this, &ModFolderPage::deleteModMetadata);
|
||||||
actionRemoveItemMetadata->setEnabled(false);
|
actionRemoveItemMetadata->setEnabled(false);
|
||||||
|
|
||||||
auto actionExportMetadata = updateMenu->addAction(tr("Export metadata"));
|
|
||||||
actionExportMetadata->setToolTip(tr("Export mod's metadata to text"));
|
|
||||||
connect(actionExportMetadata, &QAction::triggered, this, &ModFolderPage::exportModMetadata);
|
|
||||||
|
|
||||||
ui->actionUpdateItem->setMenu(updateMenu);
|
ui->actionUpdateItem->setMenu(updateMenu);
|
||||||
|
|
||||||
ui->actionUpdateItem->setToolTip(tr("Try to check or update all selected mods (all mods if none are selected)"));
|
ui->actionUpdateItem->setToolTip(tr("Try to check or update all selected mods (all mods if none are selected)"));
|
||||||
@ -126,6 +122,9 @@ ModFolderPage::ModFolderPage(BaseInstance* inst, std::shared_ptr<ModFolderModel>
|
|||||||
ui->actionsToolbar->addAction(ui->actionVisitItemPage);
|
ui->actionsToolbar->addAction(ui->actionVisitItemPage);
|
||||||
connect(ui->actionVisitItemPage, &QAction::triggered, this, &ModFolderPage::visitModPages);
|
connect(ui->actionVisitItemPage, &QAction::triggered, this, &ModFolderPage::visitModPages);
|
||||||
|
|
||||||
|
ui->actionsToolbar->insertActionAfter(ui->actionVisitItemPage, ui->actionExportMetadata);
|
||||||
|
connect(ui->actionExportMetadata, &QAction::triggered, this, &ModFolderPage::exportModMetadata);
|
||||||
|
|
||||||
auto check_allow_update = [this] { return ui->treeView->selectionModel()->hasSelection() || !m_model->empty(); };
|
auto check_allow_update = [this] { return ui->treeView->selectionModel()->hasSelection() || !m_model->empty(); };
|
||||||
|
|
||||||
connect(ui->treeView->selectionModel(), &QItemSelectionModel::selectionChanged, this,
|
connect(ui->treeView->selectionModel(), &QItemSelectionModel::selectionChanged, this,
|
||||||
|
Loading…
Reference in New Issue
Block a user