forked from qt-creator/qt-creator
ADS: Hide detached window if not in design mode
Task-number: QDS-1672 Change-Id: Ia20113cb9025c19194d87920cf060d2b9791e52a Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
committed by
Thomas Hartmann
parent
6de4e49646
commit
73aaa2a381
@@ -98,6 +98,7 @@ namespace ADS
|
||||
bool m_autorestoreLastWorkspace; // This option is set in the Workspace Manager!
|
||||
QSettings *m_settings = nullptr;
|
||||
QString m_workspacePresetsPath;
|
||||
bool m_modeChangeState;
|
||||
|
||||
/**
|
||||
* Private data constructor
|
||||
@@ -576,6 +577,9 @@ namespace ADS
|
||||
|
||||
bool DockManager::save()
|
||||
{
|
||||
if (isModeChangeState())
|
||||
return false;
|
||||
|
||||
emit aboutToSaveWorkspace();
|
||||
|
||||
bool result = write(activeWorkspace(), saveState(), parentWidget());
|
||||
@@ -836,6 +840,16 @@ namespace ADS
|
||||
return result;
|
||||
}
|
||||
|
||||
void DockManager::setModeChangeState(bool value)
|
||||
{
|
||||
d->m_modeChangeState = value;
|
||||
}
|
||||
|
||||
bool DockManager::isModeChangeState() const
|
||||
{
|
||||
return d->m_modeChangeState;
|
||||
}
|
||||
|
||||
bool DockManager::write(const QString &workspace, const QByteArray &data, QString *errorString) const
|
||||
{
|
||||
Utils::FilePath filename = workspaceNameToFileName(workspace);
|
||||
|
||||
Reference in New Issue
Block a user