File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -306,6 +306,8 @@ std::shared_ptr<SurfacePointWidget> PickPointManager::createPickWidget_( const s
306
306
{
307
307
if ( auto obj = objPtr.lock () )
308
308
{
309
+ if ( params.onUpdatePoints && !params.onUpdatePoints ( obj ) )
310
+ return ;
309
311
auto & points = pickedPoints_[obj];
310
312
const auto pointCount = points.size ();
311
313
for ( auto i = (int )pointCount - 1 ; i >= 0 ; --i )
Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ class MRVIEWER_CLASS PickPointManager : public MultiListener<
22
22
public:
23
23
using PickerPointCallBack = std::function<void ( std::shared_ptr<VisualObject> obj, int index )>;
24
24
using AllowCallBack = std::function<bool ( const std::shared_ptr<VisualObject>& obj, int index )>;
25
+ using ChangeObjectCallBack = std::function<bool ( const std::shared_ptr<VisualObject>& obj )>;
25
26
26
27
struct Params
27
28
{
@@ -78,6 +79,11 @@ class MRVIEWER_CLASS PickPointManager : public MultiListener<
78
79
79
80
// / This callback is invoked when a point is removed with its index before deletion
80
81
PickerPointCallBack onPointRemove;
82
+
83
+ // / This callback is invoked when an object was changed and needed update of points
84
+ // / Return false if need to skip internal updates
85
+ ChangeObjectCallBack onUpdatePoints;
86
+
81
87
};
82
88
Params params;
83
89
You can’t perform that action at this time.
0 commit comments