Disallow dropping curves onto other curves

* Dropping curves between other curves works much better with this change.
This commit is contained in:
Gaute Lindkvist
2020-08-13 12:00:53 +02:00
parent fee1608cda
commit 6bcf1b56fe
6 changed files with 85 additions and 239 deletions

View File

@@ -64,29 +64,15 @@ private:
caf::PdmObjectGroup& objectGroup,
RimIdenticalGridCaseGroup* gridCaseGroup );
bool handleWellLogPlotCurveDrop( Qt::DropAction action,
caf::PdmObjectGroup& objectGroup,
RimWellLogCurve* wellLogPlotCurve,
int insertAtPosition,
bool isSwapOperation = false );
bool handleWellLogPlotTrackDrop( Qt::DropAction action,
caf::PdmObjectGroup& objectGroup,
RimWellLogTrack* wellLogPlotTrack,
int insertAtPosition,
bool isSwapOperation = false );
int insertAtPosition );
bool handleWellLogPlotDrop( Qt::DropAction action,
caf::PdmObjectGroup& objectGroup,
RimWellLogPlot* wellLogPlot,
int insertAtPosition,
bool isSwapOperation = false );
bool handleSummaryCurveDrop( Qt::DropAction action,
caf::PdmObjectGroup& objectGroup,
RimSummaryCurve* summaryCurveTarget,
int insertAtPosition,
bool isSwapOperation = false );
int insertAtPosition );
bool handleSummaryPlotDrop( Qt::DropAction action,
caf::PdmObjectGroup& objectGroup,
@@ -106,7 +92,6 @@ private:
static void objectGroupFromModelIndexes( caf::PdmObjectGroup* objectGroup, const QModelIndexList& indexes );
static std::vector<caf::PdmPointer<caf::PdmObjectHandle>> objectHandlesFromSelection();
static bool isSwapOperation( int targetRow, const QModelIndexList& dragIndices, const QModelIndex& dropTargetIndex );
private:
mutable std::vector<caf::PdmPointer<caf::PdmObjectHandle>> m_dragItems;