mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-19 22:23:51 +00:00
Merged pull request #1948
This commit is contained in:
commit
6a9618f0f5
5 changed files with 24 additions and 3 deletions
|
@ -137,6 +137,7 @@
|
||||||
Feature #1617: Editor: Enchantment effect record verifier
|
Feature #1617: Editor: Enchantment effect record verifier
|
||||||
Feature #1645: Casting effects from objects
|
Feature #1645: Casting effects from objects
|
||||||
Feature #2606: Editor: Implemented (optional) case sensitive global search
|
Feature #2606: Editor: Implemented (optional) case sensitive global search
|
||||||
|
Feature #2847: Content selector: allow to copy the path to a file by using the context menu
|
||||||
Feature #3083: Play animation when NPC is casting spell via script
|
Feature #3083: Play animation when NPC is casting spell via script
|
||||||
Feature #3103: Provide option for disposition to get increased by successful trade
|
Feature #3103: Provide option for disposition to get increased by successful trade
|
||||||
Feature #3276: Editor: Search - Show number of (remaining) search results and indicate a search without any results
|
Feature #3276: Editor: Search - Show number of (remaining) search results and indicate a search without any results
|
||||||
|
|
|
@ -48,6 +48,8 @@ namespace ContentSelectorModel
|
||||||
|
|
||||||
QModelIndex indexFromItem(const EsmFile *item) const;
|
QModelIndex indexFromItem(const EsmFile *item) const;
|
||||||
const EsmFile *item(const QString &name) const;
|
const EsmFile *item(const QString &name) const;
|
||||||
|
const EsmFile *item(int row) const;
|
||||||
|
EsmFile *item(int row);
|
||||||
QStringList gameFiles() const;
|
QStringList gameFiles() const;
|
||||||
|
|
||||||
bool isEnabled (QModelIndex index) const;
|
bool isEnabled (QModelIndex index) const;
|
||||||
|
@ -65,8 +67,6 @@ namespace ContentSelectorModel
|
||||||
private:
|
private:
|
||||||
|
|
||||||
void addFile(EsmFile *file);
|
void addFile(EsmFile *file);
|
||||||
const EsmFile *item(int row) const;
|
|
||||||
EsmFile *item(int row);
|
|
||||||
|
|
||||||
void sortFiles();
|
void sortFiles();
|
||||||
|
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
#include <QMenu>
|
#include <QMenu>
|
||||||
#include <QContextMenuEvent>
|
#include <QContextMenuEvent>
|
||||||
|
|
||||||
|
#include <QClipboard>
|
||||||
#include <QGridLayout>
|
#include <QGridLayout>
|
||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
#include <QModelIndex>
|
#include <QModelIndex>
|
||||||
|
@ -67,6 +68,7 @@ void ContentSelectorView::ContentSelector::buildContextMenu()
|
||||||
mContextMenu = new QMenu(ui.addonView);
|
mContextMenu = new QMenu(ui.addonView);
|
||||||
mContextMenu->addAction(tr("&Check Selected"), this, SLOT(slotCheckMultiSelectedItems()));
|
mContextMenu->addAction(tr("&Check Selected"), this, SLOT(slotCheckMultiSelectedItems()));
|
||||||
mContextMenu->addAction(tr("&Uncheck Selected"), this, SLOT(slotUncheckMultiSelectedItems()));
|
mContextMenu->addAction(tr("&Uncheck Selected"), this, SLOT(slotUncheckMultiSelectedItems()));
|
||||||
|
mContextMenu->addAction(tr("&Copy Path(s) to Clipboard"), this, SLOT(slotCopySelectedItemsPaths()));
|
||||||
}
|
}
|
||||||
|
|
||||||
void ContentSelectorView::ContentSelector::setProfileContent(const QStringList &fileList)
|
void ContentSelectorView::ContentSelector::setProfileContent(const QStringList &fileList)
|
||||||
|
@ -245,3 +247,20 @@ void ContentSelectorView::ContentSelector::slotCheckMultiSelectedItems()
|
||||||
{
|
{
|
||||||
setCheckStateForMultiSelectedItems(true);
|
setCheckStateForMultiSelectedItems(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ContentSelectorView::ContentSelector::slotCopySelectedItemsPaths()
|
||||||
|
{
|
||||||
|
QClipboard *clipboard = QApplication::clipboard();
|
||||||
|
QString filepaths;
|
||||||
|
foreach (const QModelIndex& index, ui.addonView->selectionModel()->selectedIndexes())
|
||||||
|
{
|
||||||
|
int row = mAddonProxyModel->mapToSource(index).row();
|
||||||
|
const ContentSelectorModel::EsmFile *file = mContentModel->item(row);
|
||||||
|
filepaths += file->filePath() + "\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!filepaths.isEmpty())
|
||||||
|
{
|
||||||
|
clipboard->setText(filepaths);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -70,6 +70,7 @@ namespace ContentSelectorView
|
||||||
void slotShowContextMenu(const QPoint& pos);
|
void slotShowContextMenu(const QPoint& pos);
|
||||||
void slotCheckMultiSelectedItems();
|
void slotCheckMultiSelectedItems();
|
||||||
void slotUncheckMultiSelectedItems();
|
void slotUncheckMultiSelectedItems();
|
||||||
|
void slotCopySelectedItemsPaths();
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -62,7 +62,7 @@
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string>Select a profiile</string>
|
<string>Select a content list</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
|
Loading…
Reference in a new issue