mirror of
https://github.com/creyD/intelliphoto.git
synced 2026-04-14 04:10:31 +02:00
Added Debug Catch for maybeSave
This commit is contained in:
@@ -777,28 +777,26 @@ void IntelliPhotoGui::setIntelliStyle(){
|
|||||||
|
|
||||||
bool IntelliPhotoGui::maybeSave(){
|
bool IntelliPhotoGui::maybeSave(){
|
||||||
// Check for changes since last save
|
// Check for changes since last save
|
||||||
|
#ifdef QT_NO_DEBUG
|
||||||
|
QMessageBox::StandardButton ret;
|
||||||
|
|
||||||
// TODO insert variable for modified status here to make an save exit message
|
// Painting is the title of the window
|
||||||
if (false) {
|
// Add text and the buttons
|
||||||
QMessageBox::StandardButton ret;
|
ret = QMessageBox::warning(this, tr("Painting"),
|
||||||
|
tr("The image has been modified.\n"
|
||||||
|
"Do you want to save your changes?"),
|
||||||
|
QMessageBox::Save | QMessageBox::Discard
|
||||||
|
| QMessageBox::Cancel);
|
||||||
|
|
||||||
// Painting is the title of the window
|
// If save button clicked call for file to be saved
|
||||||
// Add text and the buttons
|
if (ret == QMessageBox::Save) {
|
||||||
ret = QMessageBox::warning(this, tr("Painting"),
|
return saveFile("png");
|
||||||
tr("The image has been modified.\n"
|
|
||||||
"Do you want to save your changes?"),
|
|
||||||
QMessageBox::Save | QMessageBox::Discard
|
|
||||||
| QMessageBox::Cancel);
|
|
||||||
|
|
||||||
// If save button clicked call for file to be saved
|
// If cancel do nothing
|
||||||
if (ret == QMessageBox::Save) {
|
} else if (ret == QMessageBox::Cancel) {
|
||||||
return saveFile("png");
|
return false;
|
||||||
|
|
||||||
// If cancel do nothing
|
|
||||||
} else if (ret == QMessageBox::Cancel) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user