Ensure the Escape key doesn't make Plot and Remote docks go away

Override reject() as done in other dock dialogs.

Fixes #1310
This commit is contained in:
mgrojo
2018-01-30 20:33:15 +01:00
parent c8276030ae
commit 5dbb7ff645
4 changed files with 18 additions and 0 deletions

View File

@@ -861,3 +861,10 @@ void PlotDock::toggleStackedBars(bool stacked)
adjustBars();
ui->plotWidget->replot();
}
void PlotDock::reject()
{
// We override this, to ensure the Escape key doesn't make this dialog
// dock go away
return;
}

View File

@@ -67,6 +67,7 @@ public slots:
void updatePlot(SqliteTableModel* model, BrowseDataTableSettings* settings = nullptr, bool update = true, bool keepOrResetSelection = true);
void fetchAllData();
void resetPlot();
virtual void reject();
signals:
void pointsSelected(int firstIndex, int count);

View File

@@ -132,3 +132,10 @@ void RemoteDock::newDirectoryNode(const QModelIndex& parent)
}
}
}
void RemoteDock::reject()
{
// We override this, to ensure the Escape key doesn't make this dialog
// dock go away
return;
}

View File

@@ -22,6 +22,9 @@ public:
void reloadSettings();
void enableButtons();
public slots:
virtual void reject();
private slots:
void setNewIdentity();
void fetchDatabase(const QModelIndex& idx);