mirror of
https://github.com/leozide/leocad
synced 2024-12-25 21:58:23 +01:00
Update connections before using the view manipulator.
This commit is contained in:
parent
fd61c1c9f9
commit
17078dd447
3 changed files with 5 additions and 4 deletions
|
@ -257,6 +257,7 @@ public:
|
|||
void Paste(bool PasteToCurrentStep);
|
||||
void DuplicateSelectedPieces();
|
||||
void PaintSelectedPieces();
|
||||
void UpdateTrainTrackConnections(lcPiece* FocusPiece) const;
|
||||
|
||||
void GetScene(lcScene* Scene, const lcCamera* ViewCamera, bool AllowHighlight, bool AllowFade) const;
|
||||
void AddSubModelRenderMeshes(lcScene* Scene, const lcMatrix44& WorldMatrix, int DefaultColorIndex, lcRenderMeshState RenderMeshState, bool ParentActive) const;
|
||||
|
@ -391,8 +392,6 @@ protected:
|
|||
void AddPiece(lcPiece* Piece);
|
||||
void InsertPiece(lcPiece* Piece, size_t Index);
|
||||
|
||||
void UpdateTrainTrackConnections(lcPiece* FocusPiece) const;
|
||||
|
||||
lcPOVRayOptions mPOVRayOptions;
|
||||
lcModelProperties mProperties;
|
||||
Project* const mProject;
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
// auto replace cross when going over a straight section
|
||||
// redo gizmo
|
||||
// add cross to gizmo
|
||||
// rotate around connections
|
||||
// rotate around connections shortcut
|
||||
// shortcuts for changing active connection
|
||||
// move config to json
|
||||
// add other track types
|
||||
|
|
|
@ -960,11 +960,13 @@ std::pair<lcTrackTool, quint32> lcViewManipulator::UpdateSelectMove()
|
|||
|
||||
if (Focus && Focus->IsPiece())
|
||||
{
|
||||
const lcPiece* Piece = (lcPiece*)Focus;
|
||||
lcPiece* Piece = (lcPiece*)Focus;
|
||||
const lcTrainTrackInfo* TrainTrackInfo = Piece->mPieceInfo->GetTrainTrackInfo();
|
||||
|
||||
if (TrainTrackInfo)
|
||||
{
|
||||
ActiveModel->UpdateTrainTrackConnections(Piece);
|
||||
|
||||
const std::vector<lcTrainTrackConnection>& Connections = TrainTrackInfo->GetConnections();
|
||||
|
||||
for (quint32 ConnectionIndex = 0; ConnectionIndex < Connections.size(); ConnectionIndex++)
|
||||
|
|
Loading…
Reference in a new issue