Save location of legend in worksheet.

Also provides a different cursor when over a legend (to make it clearer
that you can drag it).
This commit is contained in:
Jeff Young
2023-03-20 09:51:41 +00:00
parent ec6d709929
commit a14c017def
3 changed files with 59 additions and 14 deletions
+10 -2
View File
@@ -1869,7 +1869,10 @@ void mpWindow::OnMouseMove( wxMouseEvent& event )
{
if( m_movingInfoLayer )
{
cursor = wxCURSOR_SIZEWE;
if( dynamic_cast<mpInfoLegend*>( m_movingInfoLayer ) )
cursor = wxCURSOR_SIZING;
else
cursor = wxCURSOR_SIZEWE;
wxPoint moveVector( event.GetX() - m_mouseLClick.x, event.GetY() - m_mouseLClick.y );
m_movingInfoLayer->Move( moveVector );
@@ -1903,7 +1906,12 @@ void mpWindow::OnMouseMove( wxMouseEvent& event )
mpInfoLayer* infoLayer = (mpInfoLayer*) layer;
if( infoLayer->Inside( event.GetPosition() ) )
cursor = wxCURSOR_SIZEWE;
{
if( dynamic_cast<mpInfoLegend*>( infoLayer ) )
cursor = wxCURSOR_SIZING;
else
cursor = wxCURSOR_SIZEWE;
}
}
}