cbAutoAddPoints = new wxCheckBox(panel,-1, _T("Auto") , wxDefaultPosition, sizeButton );
wxButton *btnMovePointUp = new wxButton( panel, -1, _T("<-") , wxDefaultPosition, sizeButton );
wxButton *btnMovePointDown = new wxButton( panel, -1, _T("->") , wxDefaultPosition, sizeButton );
-
wxButton *btnSetPositionPoint = new wxButton( panel, -1, _T("Set") , wxDefaultPosition, sizeButton );
cbTrackPoint = new wxCheckBox(panel,-1, _T("Tra.") , wxDefaultPosition, sizeButton );
wxButton *btnRenamePoint = new wxButton( panel, -1, _T("Ren.") , wxDefaultPosition, sizeButton );
wxButton *btnErasePoint = new wxButton( panel, -1, _T("-") , wxDefaultPosition, sizeButton );
// wxButton *btnEraseLastPoint = new wxButton( panel, -1, _T("- lst") , wxDefaultPosition, sizeButton );
wxButton *btnDeleteAllPoints = new wxButton( panel, -1, _T("--") , wxDefaultPosition, sizeButton );
-
wxButton *btnUndo = NULL;
wxButton *btnRedo = NULL;
-
wxButton *btnSavePoints = NULL;
wxButton *btnLoadPoints = NULL;
-
-
btnBackPoint -> SetToolTip( _T("Select befor point") );
btnNextPoint -> SetToolTip( _T("Select next point") );
cbAutoAddPoints -> SetToolTip( _T("Auto Add point") );
btnMovePointDown -> SetToolTip( _T("Move point Down in the normal direction") );
btnRenamePoint -> SetToolTip( _T("Rename label for each point") );
textCtrl -> SetToolTip( _T("Point label") );
-
-
btnErasePoint -> SetToolTip( _T("- Erase point") );
// btnEraseLastPoint -> SetToolTip( _T("- lst Erase last point") );
btnDeleteAllPoints -> SetToolTip( _T("-- Erase all points") );
-
if ( mtype==0 )
{
btnUndo = new wxButton( panel, -1, _T("Undo") , wxDefaultPosition, sizeButton );
Connect(btnRedo->GetId() , wxEVT_COMMAND_BUTTON_CLICKED , (wxObjectEventFunction) &WidgetShowNPoints::OnRedo );
} // if mtype
txtNrPoints = new wxStaticText(panel,-1, _T(" -/-"));
-
wxStaticText* txOpacity;
wxStaticText* txRadio;
if ( (mtype==0) || (mtype==3) )
sizer7->Add( btnMovePointDown );
sizer8->Add( cbAutoAddPoints );
sizer8->Add( txtNrPoints );
-
// sizer0->Add(askPointLabel); // JPR
sizer0->Add(sizer8);
sizer0->Add(sizer6);
// sizer5->Add(sdrRadio,1,wxGROW );
// sizer5->Add(txOpacity);
// sizer5->Add(sdrOpacity,1,wxGROW );
-
sizer5->Add( sCtrlRadio );
sizer5->Add( sCtrlOpacity );
-
-
sizer0->Add(sizer5);
-
} // if mtype 0 3
if ( mtype==0 )
{
sCtrlOpacity->SetValue( 10 );
Connect( sCtrlRadio->GetId() ,wxEVT_COMMAND_SPINCTRL_UPDATED,(wxObjectEventFunction)(void (wxPanel::*)(wxScrollEvent&)) &WidgetShowNPoints::UpdatePoints);
Connect( sCtrlOpacity->GetId() ,wxEVT_COMMAND_SPINCTRL_UPDATED,(wxObjectEventFunction)(void (wxPanel::*)(wxScrollEvent&)) &WidgetShowNPoints::UpdatePoints);
-
-
Connect(btnSetPositionPoint->GetId() , wxEVT_COMMAND_BUTTON_CLICKED , (wxObjectEventFunction) &WidgetShowNPoints::OnSetPoint);
-
wxFlexGridSizer *sizer1 = new wxFlexGridSizer(1);
sizer1->Add(btnSetPositionPoint);
sizer1->Add(txtNrPoints);
}
RefreshCollectionText();
RefreshColourCollection();
-
UndoRedo_SaveCollection();
}
{
if ( cbTrackPoint->GetValue() == true )
{
- int id = GetModelShowNPoints()->IdInsidePoint();
- if (id>=0)
- {
- idTrack=id;
- }
+// int id = GetModelShowNPoints()->IdInsidePoint();
+// if (id>=0)
+// {
+// idTrack=id;
+// }
+
+// int idTrack = GetModelShowNPoints()->GetIdCurrentPoint();
+ int idTrack = GetModelShowNPoints()->GetNearestPoint();
+
if (idTrack>=0)
{
{
StopAutoAddPoints();
- idTrack = -1;
+// idTrack = -1;
if ( cbTrackPoint->GetValue() == true )
{
// EED 2023-06-23
// idTrack = GetModelShowNPoints()->IdInsidePoint();
- idTrack = GetModelShowNPoints()->GetIdCurrentPoint();
+// idTrack = GetModelShowNPoints()->GetIdCurrentPoint();
} // if trackPointFlag
}
void WidgetShowNPoints::StopTrackPoint( )
{
cbTrackPoint->SetValue(false);
- idTrack=-1;
+// idTrack=-1;
}
//------------------------------------------------------------------------
}
return lstIndexs;
}
+
+//------------------------------------------------------------------------
+std::vector<int> WidgetShowNPoints::GetLstSelectedIndexs()
+{
+ std::vector<int> lstSelectedIndexs;
+ if ( (cbVisuActualCollection!=NULL) && (cbVisuActualCollection->GetValue()==true) )
+ {
+ lstSelectedIndexs.push_back( mActualCollection );
+ }
+ return lstSelectedIndexs;
+}
+
//------------------------------------------------------------------------
int WidgetShowNPoints::GetLstModelShowNPointsSize()
{