myRedoList.clear();
myLengthIORedoList.Clear();
myAngleIORedoList.Clear();
+ myTextIORedoList.Clear();
if (myCoordType == 0 && myMode == 1) // RELATIVE CARTESIAN COORDINATES
{
SUIT_ViewWindow* vw = SUIT_Session::session()->activeApplication()->desktop()->activeWindow();
((SOCC_Viewer*)(vw->getViewManager()->getViewModel()))->Erase(myLengthPrs, true);
((SOCC_Viewer*)(vw->getViewManager()->getViewModel()))->Erase(myAnglePrs, true);
+ ((SOCC_Viewer*)(vw->getViewManager()->getViewModel()))->Erase(myTextPrs, true);
removeLastIOFromPrs();
((SOCC_Viewer*)(vw->getViewManager()->getViewModel()))->Display(myLengthPrs);
if (isAngleVisible)
((SOCC_Viewer*)(vw->getViewManager()->getViewModel()))->Display(myAnglePrs);
+ ((SOCC_Viewer*)(vw->getViewManager()->getViewModel()))->Display(myTextPrs);
// Remove last point from list
myPointsList.removeLast();
SUIT_ViewWindow* vw = SUIT_Session::session()->activeApplication()->desktop()->activeWindow();
((SOCC_Viewer*)(vw->getViewManager()->getViewModel()))->Erase(myLengthPrs, true);
((SOCC_Viewer*)(vw->getViewManager()->getViewModel()))->Erase(myAnglePrs, true);
+ ((SOCC_Viewer*)(vw->getViewManager()->getViewModel()))->Erase(myTextPrs, true);
restoreLastIOToPrs();
((SOCC_Viewer*)(vw->getViewManager()->getViewModel()))->Display(myLengthPrs);
if (isAngleVisible)
((SOCC_Viewer*)(vw->getViewManager()->getViewModel()))->Display(myAnglePrs);
+ ((SOCC_Viewer*)(vw->getViewManager()->getViewModel()))->Display(myTextPrs);
// Remove last point from redo list
myRedoList.removeLast();
myAngleIORedoList.Prepend(anIOList.First()); // Store last prepended Angle IO in redo list
myAnglePrs->RemoveFirst(); // Remove it from myAnglePrs
}
+ for (int t = 0; t<Last.T; t++)
+ {
+ myTextPrs->GetObjects(anIOList);
+ myTextIORedoList.Prepend(anIOList.First()); // Store last prepended Text IO in redo list
+ myTextPrs->RemoveFirst(); // Remove it from myTextPrs
+ }
}
//=================================================================================
myAnglePrs->PrependObject(myAngleIORedoList.First()); // Restore last removed IO
myAngleIORedoList.RemoveFirst(); // Remove it from redo list
}
+ for (int t = 0; t<LastDeleted.T; t++)
+ {
+ myTextPrs->PrependObject(myTextIORedoList.First()); // Restore last removed IO
+ myTextIORedoList.RemoveFirst(); // Remove it from redo list
+ }
}
//=================================================================================
// Update point presentation type
xyz.A = myPrsType.A; // Number of angle diomensions
xyz.L = myPrsType.L; // Number of length dimensions
+ xyz.T = myPrsType.T; // Number of text objects
return xyz;
}
displayAngle(anAngle1, P0, P1, P2, store);
else
{
- std::string anAngleText = doubleToString(anAngle1) + "deg";
+ std::string anAngleText = doubleToString(anAngle1) + " deg.";
displayText(anAngleText, Current_Pnt, store);
}
// Display modified presentation
((SOCC_Viewer*)(vw->getViewManager()->getViewModel()))->Display(myTextPrs);
+
+ // Update dimension presentation text count for later undo / redo
+ myPrsType.T += 1;
}
else
{
struct XYZ
{
- XYZ() { x = y = z = 0.0; command = params = ""; L=A=0; }
+ XYZ() { x = y = z = 0.0; command = params = ""; L=A=T=0; }
double x, y, z; // for preview only
- int L, A; // for preview only
+ int L, A, T; // for preview only
QString command;
QString params;
};
struct prsType
{
- prsType(){L=A=0;}
+ prsType(){L=A=T=0;}
int L;
int A;
+ int T;
};
typedef QList<XYZ> XYZList;
XYZList myRedoList;
AIS_ListOfInteractive myLengthIORedoList;
AIS_ListOfInteractive myAngleIORedoList;
+ AIS_ListOfInteractive myTextIORedoList;
prsType myPrsType;
EntityGUI_3Spin* Group3Spin;