FEM: Results can now be double-clicked to show their task panel

This commit is contained in:
Yorik van Havre 2016-04-17 14:01:10 -03:00
parent c5876fe7ca
commit 6b1c433807
No known key found for this signature in database
GPG Key ID: 4C7794EF1595A813
2 changed files with 10 additions and 0 deletions

View File

@ -27,6 +27,7 @@
#endif
#include "ViewProviderResult.h"
#include "Gui/Command.h"
using namespace FemGui;
@ -44,6 +45,13 @@ ViewProviderResult::~ViewProviderResult()
}
bool ViewProviderResult::doubleClicked(void)
{
Gui::Command::runCommand(Gui::Command::Gui, "Gui.runCommand('Fem_ShowResult')");
return true;
}
// Python feature -----------------------------------------------------------------------
namespace Gui {

View File

@ -44,6 +44,8 @@ public:
// shows solid in the tree
virtual bool isShow(void) const
{ return true; }
bool doubleClicked(void);
};
typedef Gui::ViewProviderPythonFeatureT<ViewProviderResult> ViewProviderResultPython;