mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Remove export and save as from dive list context menu
The context menu is getting way too big and confusing. This is now much more cleanly done from the File->Export dialog. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
d2569c6688
commit
2a88a72f1a
2 changed files with 0 additions and 37 deletions
|
@ -775,8 +775,6 @@ void DiveListView::contextMenuEvent(QContextMenuEvent *event)
|
|||
popup.addAction(tr("merge selected dives"), this, SLOT(mergeDives()));
|
||||
if (amount_selected >= 1) {
|
||||
popup.addAction(tr("renumber dive(s)"), this, SLOT(renumberDives()));
|
||||
popup.addAction(tr("save As"), this, SLOT(saveSelectedDivesAs()));
|
||||
popup.addAction(tr("export dive log"), this, SLOT(exportDives()));
|
||||
popup.addAction(tr("shift times"), this, SLOT(shiftTimes()));
|
||||
popup.addAction(tr("load images"), this, SLOT(loadImages()));
|
||||
}
|
||||
|
@ -792,39 +790,6 @@ void DiveListView::contextMenuEvent(QContextMenuEvent *event)
|
|||
event->accept();
|
||||
}
|
||||
|
||||
void DiveListView::saveSelectedDivesAs()
|
||||
{
|
||||
QSettings settings;
|
||||
QString lastDir = QDir::homePath();
|
||||
|
||||
settings.beginGroup("FileDialog");
|
||||
if (settings.contains("LastDir")) {
|
||||
if (QDir::setCurrent(settings.value("LastDir").toString())) {
|
||||
lastDir = settings.value("LastDir").toString();
|
||||
}
|
||||
}
|
||||
settings.endGroup();
|
||||
|
||||
QString fileName = QFileDialog::getSaveFileName(MainWindow::instance(), tr("Save Dives As..."), QDir::homePath());
|
||||
if (fileName.isEmpty())
|
||||
return;
|
||||
|
||||
// Keep last open dir
|
||||
QFileInfo fileInfo(fileName);
|
||||
settings.beginGroup("FileDialog");
|
||||
settings.setValue("LastDir", fileInfo.dir().path());
|
||||
settings.endGroup();
|
||||
|
||||
QByteArray bt = QFile::encodeName(fileName);
|
||||
save_dives_logic(bt.data(), true);
|
||||
}
|
||||
|
||||
void DiveListView::exportDives()
|
||||
{
|
||||
DiveLogExportDialog *diveLogExport = new DiveLogExportDialog();
|
||||
diveLogExport->show();
|
||||
}
|
||||
|
||||
void DiveListView::shiftTimes()
|
||||
{
|
||||
ShiftTimesDialog::instance()->show();
|
||||
|
|
|
@ -49,8 +49,6 @@ slots:
|
|||
void addToTripBelow();
|
||||
void mergeDives();
|
||||
void renumberDives();
|
||||
void saveSelectedDivesAs();
|
||||
void exportDives();
|
||||
void shiftTimes();
|
||||
void loadImages();
|
||||
static QString lastUsedImageDir();
|
||||
|
|
Loading…
Add table
Reference in a new issue