parent
bd4afb7000
commit
16cf055b4c
|
@ -612,7 +612,7 @@ void MainWindow::closeEvent(QCloseEvent *event)
|
|||
{
|
||||
if (changeInFile == true)
|
||||
{
|
||||
QMessageBox msgBox;
|
||||
QMessageBox msgBox(this);
|
||||
msgBox.setText(tr("The pattern has been modified."));
|
||||
msgBox.setInformativeText(tr("Do you want to save your changes?"));
|
||||
msgBox.setStandardButtons(QMessageBox::Save | QMessageBox::Discard | QMessageBox::Cancel);
|
||||
|
|
|
@ -210,6 +210,16 @@ void VAbstractTool::DeleteTool(QGraphicsItem *tool)
|
|||
{
|
||||
if (_referens <= 1)
|
||||
{
|
||||
QMessageBox msgBox;
|
||||
msgBox.setText(tr("Confirm the deletion."));
|
||||
msgBox.setInformativeText(tr("Do you really want delete?"));
|
||||
msgBox.setStandardButtons(QMessageBox::Ok | QMessageBox::Cancel);
|
||||
msgBox.setDefaultButton(QMessageBox::Ok);
|
||||
msgBox.setIcon(QMessageBox::Question);
|
||||
if (msgBox.exec() == QMessageBox::Cancel)
|
||||
{
|
||||
return;
|
||||
}
|
||||
//remove from xml file
|
||||
QDomElement domElement = doc->elementById(QString().setNum(id));
|
||||
if (domElement.isElement())
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
|
||||
#include "vdatatool.h"
|
||||
#include "../xml/vdomdocument.h"
|
||||
#include <QMessageBox>
|
||||
|
||||
/**
|
||||
* @brief The VAbstractTool abstract class for all tools.
|
||||
|
@ -47,7 +48,7 @@ public:
|
|||
* @param parent parent object.
|
||||
*/
|
||||
VAbstractTool(VDomDocument *doc, VContainer *data, qint64 id, QObject *parent = 0);
|
||||
virtual ~VAbstractTool() {}
|
||||
virtual ~VAbstractTool(){}
|
||||
/**
|
||||
* @brief NewSceneRect calculate scene rect what contains all items and doesn't less that size of scene view.
|
||||
* @param sc scene.
|
||||
|
|
Loading…
Reference in New Issue
Block a user