single selection hotkeys improved

This commit is contained in:
Syping 2018-06-17 22:02:41 +02:00
parent c909e20178
commit 9b5cb46c35
2 changed files with 23 additions and 4 deletions

View file

@ -955,7 +955,7 @@ void PictureDialog::editSnapmaticImage()
#ifndef Q_OS_ANDROID #ifndef Q_OS_ANDROID
imageEditor->show(); imageEditor->show();
#else #else
snapmaticEditor->showMaximized(); imageEditor->showMaximized();
#endif #endif
imageEditor->exec(); imageEditor->exec();
delete imageEditor; delete imageEditor;

View file

@ -1803,7 +1803,13 @@ void ProfileInterface::massTool(MassTool tool)
return; return;
} }
PlayerListDialog *playerListDialog = new PlayerListDialog(QStringList(), profileDB, this); QStringList players;
if (snapmaticWidgets.length() == 1)
{
players = snapmaticWidgets.at(0)->getPicture()->getSnapmaticProperties().playersList;
}
PlayerListDialog *playerListDialog = new PlayerListDialog(players, profileDB, this);
playerListDialog->setModal(true); playerListDialog->setModal(true);
playerListDialog->show(); playerListDialog->show();
playerListDialog->exec(); playerListDialog->exec();
@ -1811,7 +1817,7 @@ void ProfileInterface::massTool(MassTool tool)
{ {
return; return;
} }
QStringList players = playerListDialog->getPlayerList(); players = playerListDialog->getPlayerList();
delete playerListDialog; delete playerListDialog;
// Prepare Progress // Prepare Progress
@ -1897,9 +1903,14 @@ void ProfileInterface::massTool(MassTool tool)
} }
int crewID = 0; int crewID = 0;
if (snapmaticWidgets.length() == 1)
{
crewID = snapmaticWidgets.at(0)->getPicture()->getSnapmaticProperties().crewID;
}
{ {
preSelectionCrewID: preSelectionCrewID:
bool ok; bool ok;
int indexNum = 0;
QStringList itemList; QStringList itemList;
QStringList crewList = crewDB->getCrews(); QStringList crewList = crewDB->getCrews();
if (!crewList.contains(QLatin1String("0"))) if (!crewList.contains(QLatin1String("0")))
@ -1911,7 +1922,11 @@ preSelectionCrewID:
{ {
itemList += QString("%1 (%2)").arg(crew, crewDB->getCrewName(crew.toInt())); itemList += QString("%1 (%2)").arg(crew, crewDB->getCrewName(crew.toInt()));
} }
QString newCrew = QInputDialog::getItem(this, QApplication::translate("SnapmaticEditor", "Snapmatic Crew"), QApplication::translate("SnapmaticEditor", "New Snapmatic crew:"), itemList, 0, true, &ok, windowFlags()^Qt::Dialog^Qt::WindowMinMaxButtonsHint); if (crewList.contains(QString::number(crewID)))
{
indexNum = crewList.indexOf(QRegExp(QString::number(crewID)));
}
QString newCrew = QInputDialog::getItem(this, QApplication::translate("SnapmaticEditor", "Snapmatic Crew"), QApplication::translate("SnapmaticEditor", "New Snapmatic crew:"), itemList, indexNum, true, &ok, windowFlags()^Qt::Dialog^Qt::WindowMinMaxButtonsHint);
if (ok && !newCrew.isEmpty()) if (ok && !newCrew.isEmpty())
{ {
if (newCrew.contains(" ")) newCrew = newCrew.split(" ").at(0); if (newCrew.contains(" ")) newCrew = newCrew.split(" ").at(0);
@ -2015,6 +2030,10 @@ preSelectionCrewID:
} }
QString snapmaticTitle; QString snapmaticTitle;
if (snapmaticWidgets.length() == 1)
{
snapmaticTitle = snapmaticWidgets.at(0)->getPicture()->getPictureTitle();
}
{ {
preSelectionTitle: preSelectionTitle:
bool ok; bool ok;