Add context menu to empty plot window area (#14243)

* Add context menu to empty plot window area
Improve drag'n'drop into empty plot window area
This commit is contained in:
JJ authored and GitHub committed 2026-06-19 09:25:33 +02:00
1 parent c1af78a281
commit b187bf85a7
7 files changed
+100 -1

No files matched your search

@@ -971,7 +971,12 @@ void RiuPlotMainWindow::dragEnterEvent( QDragEnterEvent* event )
if ( m_centralDockWidget != nullptr )
{
QPoint curpos = m_centralDockWidget->mapFromGlobal( QCursor::pos() );
if ( m_centralDockWidget->rect().contains( curpos ) ) event->acceptProposedAction();
auto rect = m_centralDockWidget->widget()->rect();
rect.adjust( -10, -10, 10, 10 ); // allow some tolerance outside the widget
if ( rect.contains( curpos ) )
{
event->acceptProposedAction();
}
}
}
@@ -1106,3 +1111,14 @@ void RiuPlotMainWindow::slotViewFullScreen( bool showFullScreen )
}
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RiuPlotMainWindow::onCentralWidgetContextMenu( QMenu& menu )
{
QStringList commandIds;
commandIds << "RicNewEmptySummaryMultiPlotFeature";
commandIds << "RicOpenSummaryPlotEditorFromDockAreaFeature";
caf::CmdFeatureMenuBuilder::appendToMenu( &menu, commandIds );
}