EditDialog: Reset values when pressing escape in dock mode

See #441.
This commit is contained in:
Martin Kleusberg
2015-12-22 15:09:33 +01:00
parent 540b12a57a
commit 63c08d027d

View File

@@ -67,12 +67,15 @@ void EditDialog::reject()
{
// This is called when pressing the cancel button or hitting the escape key
// If we're in dock mode, move the cursor back to the table view.
// If we're in dock mode, reset all fields and move the cursor back to the table view.
// If we're in window mode, call the default implementation to just close the window normally.
if(useInDock)
{
loadText(oldData, curRow, curCol);
emit goingAway();
else
} else {
QDialog::reject();
}
}
void EditDialog::loadText(const QByteArray& data, int row, int col)