Core: Add a dialog to add properties to a VarSet
This commit is contained in:
@@ -21,10 +21,17 @@
|
||||
****************************************************************************/
|
||||
|
||||
#include "PreCompiled.h"
|
||||
#ifndef _PreComp_
|
||||
# include <memory>
|
||||
#endif
|
||||
|
||||
#include <App/VarSet.h>
|
||||
|
||||
#include "MainWindow.h"
|
||||
#include "ViewProviderVarSet.h"
|
||||
|
||||
using namespace Gui;
|
||||
using namespace Gui::Dialog;
|
||||
|
||||
PROPERTY_SOURCE(Gui::ViewProviderVarSet, Gui::ViewProviderDocumentObject)
|
||||
|
||||
@@ -33,4 +40,20 @@ ViewProviderVarSet::ViewProviderVarSet()
|
||||
sPixmap = "VarSet";
|
||||
}
|
||||
|
||||
bool ViewProviderVarSet::doubleClicked()
|
||||
{
|
||||
if (!dialog) {
|
||||
dialog = std::make_unique<DlgAddPropertyVarSet>(getMainWindow(), this);
|
||||
}
|
||||
|
||||
dialog->show();
|
||||
dialog->raise();
|
||||
dialog->activateWindow();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void ViewProviderVarSet::onFinished(int /*result*/)
|
||||
{
|
||||
dialog = nullptr;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user