forked from qt-creator/qt-creator
QmlDesigner: Don't set ALWAYS_SAVE_IN_CRUMBLEBAR when no changes in qml
Core::DocumentManager::saveModifiedDocument doesn't set the alwaysSave flag if there is nothing to save, which led to undefined results as the flag was left to uninitialized state. Change-Id: I9417775241123b9e1bb3b57b6ced96bc555fb635 Fixes: QDS-2718 Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
This commit is contained in:
@@ -135,10 +135,10 @@ Utils::CrumblePath *CrumbleBar::crumblePath()
|
||||
|
||||
void CrumbleBar::showSaveDialog()
|
||||
{
|
||||
if (DesignerSettings::getValue(DesignerSettingsKey::ALWAYS_SAVE_IN_CRUMBLEBAR).toBool()) {
|
||||
bool alwaysSave = DesignerSettings::getValue(DesignerSettingsKey::ALWAYS_SAVE_IN_CRUMBLEBAR).toBool();
|
||||
if (alwaysSave) {
|
||||
Core::DocumentManager::saveModifiedDocumentSilently(currentDesignDocument()->editor()->document());
|
||||
} else {
|
||||
bool alwaysSave;
|
||||
bool canceled;
|
||||
|
||||
Core::DocumentManager::saveModifiedDocument(currentDesignDocument()->editor()->document(),
|
||||
|
Reference in New Issue
Block a user