mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 05:00:20 +00:00
Untangle Profile from MainWindow: make profile the parent of dialogs
I don't quite know why these were parented to the MainWindow - I bet there's a very clever reason that I'm missing... Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
e28f171731
commit
e70e34801e
1 changed files with 5 additions and 5 deletions
|
@ -1373,7 +1373,7 @@ void ProfileWidget2::hideEvents()
|
|||
DiveEventItem *item = static_cast<DiveEventItem *>(action->data().value<void *>());
|
||||
struct event *event = item->getEvent();
|
||||
|
||||
if (QMessageBox::question(MainWindow::instance(),
|
||||
if (QMessageBox::question(this,
|
||||
TITLE_OR_TEXT(tr("Hide events"), tr("Hide all %1 events?").arg(event->name)),
|
||||
QMessageBox::Ok | QMessageBox::Cancel) == QMessageBox::Ok) {
|
||||
if (!same_string(event->name, "")) {
|
||||
|
@ -1408,9 +1408,9 @@ void ProfileWidget2::removeEvent()
|
|||
DiveEventItem *item = static_cast<DiveEventItem *>(action->data().value<void *>());
|
||||
struct event *event = item->getEvent();
|
||||
|
||||
if (QMessageBox::question(MainWindow::instance(), TITLE_OR_TEXT(
|
||||
tr("Remove the selected event?"),
|
||||
tr("%1 @ %2:%3").arg(event->name).arg(event->time.seconds / 60).arg(event->time.seconds % 60, 2, 10, QChar('0'))),
|
||||
if (QMessageBox::question(this, TITLE_OR_TEXT(
|
||||
tr("Remove the selected event?"),
|
||||
tr("%1 @ %2:%3").arg(event->name).arg(event->time.seconds / 60).arg(event->time.seconds % 60, 2, 10, QChar('0'))),
|
||||
QMessageBox::Ok | QMessageBox::Cancel) == QMessageBox::Ok) {
|
||||
remove_event(event);
|
||||
mark_divelist_changed(true);
|
||||
|
@ -1525,7 +1525,7 @@ void ProfileWidget2::editName()
|
|||
DiveEventItem *item = static_cast<DiveEventItem *>(action->data().value<void *>());
|
||||
struct event *event = item->getEvent();
|
||||
bool ok;
|
||||
QString newName = QInputDialog::getText(MainWindow::instance(), tr("Edit name of bookmark"),
|
||||
QString newName = QInputDialog::getText(this, tr("Edit name of bookmark"),
|
||||
tr("Custom name:"), QLineEdit::Normal,
|
||||
event->name, &ok);
|
||||
if (ok && !newName.isEmpty()) {
|
||||
|
|
Loading…
Reference in a new issue