Fixed behaviour on Windows. Valentina asks about synchronization measurements
twice. (grafted from e60ffe31f4ba96857a59275dc069bbb67a9bbbdf) --HG-- branch : develop
This commit is contained in:
parent
f69dabe007
commit
2400555d05
|
@ -37,6 +37,7 @@
|
|||
- Fix grainline position on layout.
|
||||
- [#719] Valentina crashes when unite pieces.
|
||||
- Fixed Valentina crash. Used way to avoid Qt's bug QTBUG-61213.
|
||||
- Fixed behaviour on Windows. Valentina asks about synchronization measurements twice.
|
||||
|
||||
# Version 0.5.0 May 9, 2017
|
||||
- [#581] User can now filter input lists by keyword in function wizard.
|
||||
|
|
|
@ -184,10 +184,12 @@ MainWindow::MainWindow(QWidget *parent)
|
|||
connect(watcher, &QFileSystemWatcher::fileChanged, this, &MainWindow::MeasurementsChanged);
|
||||
connect(qApp, &QApplication::focusChanged, this, [this](QWidget *old, QWidget *now)
|
||||
{
|
||||
static bool asking = false;
|
||||
if (old == nullptr && isAncestorOf(now) == true)
|
||||
{// focus IN
|
||||
if (mChanges && not mChangesAsked)
|
||||
if (not asking && mChanges && not mChangesAsked)
|
||||
{
|
||||
asking = true;
|
||||
mChangesAsked = true;
|
||||
const auto answer = QMessageBox::question(this, tr("Measurements"),
|
||||
tr("Measurements were changed. Do you want to sync measurements now?"),
|
||||
|
@ -196,6 +198,7 @@ MainWindow::MainWindow(QWidget *parent)
|
|||
{
|
||||
SyncMeasurements();
|
||||
}
|
||||
asking = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user