Update stats_panel.cpp

This commit is contained in:
GenevensiS
2025-12-29 01:13:36 +01:00
parent eb58c17201
commit 910a754d43
+7 -6
View File
@@ -194,12 +194,12 @@ private:
DECLARE_EVENT_TABLE(); DECLARE_EVENT_TABLE();
void onMotion(wxMouseEvent& ev) { void onMotion(wxMouseEvent& ev) {
wxFrame* frame = dynamic_cast<wxFrame*>( wxGetTopLevelParent(this) ); wxFrame* frame = dynamic_cast<wxFrame*>(wxGetTopLevelParent(this));
if (frame) { if (frame) frame->SetStatusText(dimensions[findItem(ev)]->description.get());
String description = ev.GetX() > NAME_COLUMN_WIDTH + dimension_count * (DIMENSION_COLUMN_WIDTH + 1) ? }
String() : dimensions[findItem(ev)]->description.get(); void onMouseLeave(wxMouseEvent& ev) {
frame->SetStatusText(description); wxFrame* frame = dynamic_cast<wxFrame*>(wxGetTopLevelParent(this));
} if (frame) frame->SetStatusText(String());
} }
}; };
@@ -594,6 +594,7 @@ END_EVENT_TABLE()
BEGIN_EVENT_TABLE(StatDimensionList, GalleryList) BEGIN_EVENT_TABLE(StatDimensionList, GalleryList)
EVT_MOTION(StatDimensionList::onMotion) EVT_MOTION(StatDimensionList::onMotion)
EVT_LEAVE_WINDOW(StatDimensionList::onMouseLeave)
END_EVENT_TABLE() END_EVENT_TABLE()
// ----------------------------------------------------------------------------- : Selection // ----------------------------------------------------------------------------- : Selection