diff --git a/src/dialogs/dialogs.h b/src/dialogs/dialogs.h
index e61d49cb5..9cdc7c318 100644
--- a/src/dialogs/dialogs.h
+++ b/src/dialogs/dialogs.h
@@ -45,8 +45,11 @@
#include "dialogspline.h"
#include "dialogsplinepath.h"
#include "dialogheight.h"
+#include "dialogcutarc.h"
#include "dialogcutspline.h"
#include "dialogcutsplinepath.h"
#include "dialoguniondetails.h"
+#include "dialogtriangle.h"
+#include "dialogpointofintersection.h"
#endif // DIALOGS_H
diff --git a/src/dialogs/dialogtool.cpp b/src/dialogs/dialogtool.cpp
index fdb056d20..45a6890d6 100644
--- a/src/dialogs/dialogtool.cpp
+++ b/src/dialogs/dialogtool.cpp
@@ -46,6 +46,8 @@ DialogTool::DialogTool(const VContainer *data, QWidget *parent)
//Keep synchronize with VAbstractTool styles list!!!
lineStyles<
hide();
+// }
+// else
+// {
+// this->show();
+// }
+}
+
template
void DialogTool::ShowVariable(const QHash *var)
{
diff --git a/src/dialogs/dialogtool.h b/src/dialogs/dialogtool.h
index ef8346c0d..bd2bf58e4 100644
--- a/src/dialogs/dialogtool.h
+++ b/src/dialogs/dialogtool.h
@@ -177,6 +177,11 @@ public slots:
* @brief UpdateList update lists of variables
*/
void UpdateList();
+ /**
+ * @brief ApplicationDeactivate hide and show dialog simultaneously with parent window.
+ * @param type true - hide, false - show window.
+ */
+ void ApplicationDeactivate(bool type);
protected:
Q_DISABLE_COPY(DialogTool)
/**
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index 2c64bc70d..799fb7b2c 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -77,22 +77,11 @@ private:
MainWindow::MainWindow(QWidget *parent)
:QMainWindow(parent), ui(new Ui::MainWindow), pattern(0), doc(0), tool(Tool::ArrowTool), currentScene(0),
sceneDraw(0), sceneDetails(0), mouseCoordinate(0), helpLabel(0), view(0), isInitialized(false), dialogTable(0),
- dialogEndLine(QSharedPointer()), dialogLine(QSharedPointer()),
- dialogAlongLine(QSharedPointer()),
- dialogShoulderPoint(QSharedPointer()), dialogNormal(QSharedPointer()),
- dialogBisector(QSharedPointer()),
- dialogLineIntersect(QSharedPointer()), dialogSpline(QSharedPointer()),
- dialogArc(QSharedPointer()), dialogSplinePath(QSharedPointer()),
- dialogPointOfContact(QSharedPointer()),
- dialogDetail(QSharedPointer()), dialogHeight(QSharedPointer()),
- dialogTriangle(QSharedPointer()),
- dialogPointOfIntersection(QSharedPointer()),
- dialogCutSpline(QSharedPointer()), dialogCutSplinePath (QSharedPointer()),
- dialogUnionDetails(QSharedPointer()), dialogCutArc(QSharedPointer()),
- dialogHistory(0), comboBoxDraws(0), fileName(QString()), changeInFile(false),
- mode(Draw::Calculation), currentDrawIndex(0), currentToolBoxIndex(0), drawMode(true)
+ dialogTool(0), dialogHistory(0), comboBoxDraws(0), fileName(QString()), changeInFile(false),
+ mode(Draw::Calculation), currentDrawIndex(0), currentToolBoxIndex(0), drawMode(true)
{
ui->setupUi(this);
+ qApp->installEventFilter(this);
static const char * GENERIC_ICON_TO_CHECK = "document-open";
if (QIcon::hasThemeIcon(GENERIC_ICON_TO_CHECK) == false)
{
@@ -287,7 +276,7 @@ void MainWindow::OptionDraw()
template
void MainWindow::SetToolButton(bool checked, Tool::Tools t, const QString &cursor, const QString &toolTip,
- QSharedPointer