@@ -6642,6 +6642,16 @@ bool CMUSHView::Mouse_Move_MiniWindow (CMUSHclientDoc* pDoc, CPoint point)
6642
6642
6643
6643
} // previous one which isn't this one, or we are no longer on one
6644
6644
6645
+ if (pHotspot)
6646
+ {
6647
+ // re-establish hotspot pointer in case previous callback deleted it
6648
+ HotspotMapIterator it = mw->m_Hotspots .find (sHotspotId );
6649
+ if (it == mw->m_Hotspots .end ())
6650
+ pHotspot = NULL ;
6651
+ else
6652
+ pHotspot = it->second ;
6653
+ } // if had a hotspot before
6654
+
6645
6655
// now, are we now over a hotspot?
6646
6656
if (pHotspot)
6647
6657
{
@@ -6672,6 +6682,16 @@ bool CMUSHView::Mouse_Move_MiniWindow (CMUSHclientDoc* pDoc, CPoint point)
6672
6682
} // end of having tooltip window
6673
6683
6674
6684
6685
+ if (pHotspot)
6686
+ {
6687
+ // re-establish hotspot pointer in case previous callback deleted it
6688
+ HotspotMapIterator it = mw->m_Hotspots .find (sHotspotId );
6689
+ if (it == mw->m_Hotspots .end ())
6690
+ pHotspot = NULL ;
6691
+ else
6692
+ pHotspot = it->second ;
6693
+ } // if had a hotspot before
6694
+
6675
6695
// capture mouse movements out of the miniwindow (version 4.46)
6676
6696
// see: http://www.gammon.com.au/forum/?id=9980
6677
6697
@@ -6782,6 +6802,16 @@ bool CMUSHView::Mouse_Down_MiniWindow (CMUSHclientDoc* pDoc, CPoint point, long
6782
6802
{
6783
6803
mw->m_sMouseOverHotspot .erase ();
6784
6804
6805
+ if (pHotspot)
6806
+ {
6807
+ // re-establish hotspot pointer in case previous callback deleted it
6808
+ HotspotMapIterator it = mw->m_Hotspots .find (sHotspotId );
6809
+ if (it == mw->m_Hotspots .end ())
6810
+ pHotspot = NULL ;
6811
+ else
6812
+ pHotspot = it->second ;
6813
+ } // if had a hotspot before
6814
+
6785
6815
// now, are we now over a hotspot?
6786
6816
if (pHotspot)
6787
6817
{
@@ -6948,6 +6978,16 @@ bool CMUSHView::Mouse_Up_MiniWindow (CMUSHclientDoc* pDoc, CPoint point, long fl
6948
6978
ReleaseCapture (); // Release the mouse capture established at
6949
6979
// the beginning of the mouse click.
6950
6980
6981
+ if (pHotspot)
6982
+ {
6983
+ // re-establish hotspot pointer in case previous callback deleted it
6984
+ HotspotMapIterator it = mw->m_Hotspots .find (sHotspotId );
6985
+ if (it == mw->m_Hotspots .end ())
6986
+ pHotspot = NULL ;
6987
+ else
6988
+ pHotspot = it->second ;
6989
+ } // if had a hotspot before
6990
+
6951
6991
// if mouse-up outside the current hotspot just cancel previous one
6952
6992
// cancel previous mouse-down hotspot (in this miniwindow)
6953
6993
if ((pHotspot == NULL || // not on any hotspot
@@ -6969,16 +7009,26 @@ bool CMUSHView::Mouse_Up_MiniWindow (CMUSHclientDoc* pDoc, CPoint point, long fl
6969
7009
6970
7010
} // previous one which isn't this one, or we are no longer on one
6971
7011
7012
+ if (pHotspot)
7013
+ {
7014
+ // re-establish hotspot pointer in case previous callback deleted it
7015
+ HotspotMapIterator it = mw->m_Hotspots .find (sHotspotId );
7016
+ if (it == mw->m_Hotspots .end ())
7017
+ pHotspot = NULL ;
7018
+ else
7019
+ pHotspot = it->second ;
7020
+ } // if had a hotspot before
7021
+
6972
7022
// now, did we release mouse over the hotspot it went down in?
6973
7023
if (pHotspot && sOldMouseDownHotspotInThisWindow == sHotspotId )
6974
7024
{
6975
- mw->m_bExecutingScript = true ;
6976
- Send_Mouse_Event_To_Plugin (pHotspot->m_dispid_MouseUp ,
6977
- mw->m_sCallbackPlugin ,
6978
- pHotspot->m_sMouseUp ,
6979
- sHotspotId ,
6980
- mw->m_FlagsOnMouseDown ); // LH / RH mouse?
6981
- mw->m_bExecutingScript = false ;
7025
+ mw->m_bExecutingScript = true ;
7026
+ Send_Mouse_Event_To_Plugin (pHotspot->m_dispid_MouseUp ,
7027
+ mw->m_sCallbackPlugin ,
7028
+ pHotspot->m_sMouseUp ,
7029
+ sHotspotId ,
7030
+ mw->m_FlagsOnMouseDown ); // LH / RH mouse?
7031
+ mw->m_bExecutingScript = false ;
6982
7032
}
6983
7033
6984
7034
m_sPreviousMiniWindow.erase (); // no longer have a previous mouse-over
0 commit comments