From 2c2bf88a405cea7b118db5014710d6b53bf0ce49 Mon Sep 17 00:00:00 2001 From: twanvl Date: Thu, 22 Mar 2007 13:07:17 +0000 Subject: [PATCH] redraw on resize git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@225 0fc631ac-6414-0410-93d0-97cfa31319b6 --- src/gui/control/gallery_list.cpp | 5 +++++ src/gui/control/gallery_list.hpp | 1 + 2 files changed, 6 insertions(+) diff --git a/src/gui/control/gallery_list.cpp b/src/gui/control/gallery_list.cpp index a78c2fb9..f940340a 100644 --- a/src/gui/control/gallery_list.cpp +++ b/src/gui/control/gallery_list.cpp @@ -171,6 +171,10 @@ void GalleryList::OnDraw(DC& dc) { } } +void GalleryList::onSize(wxSizeEvent&) { + update(); +} + void GalleryList::sendEvent(WXTYPE type) { wxCommandEvent ev(type, GetId()); ProcessEvent(ev); @@ -183,4 +187,5 @@ BEGIN_EVENT_TABLE(GalleryList, wxScrolledWindow) EVT_LEFT_DCLICK (GalleryList::onLeftDClick) EVT_CHAR (GalleryList::onChar) EVT_PAINT (GalleryList::onPaint) + EVT_SIZE (GalleryList::onSize) END_EVENT_TABLE () diff --git a/src/gui/control/gallery_list.hpp b/src/gui/control/gallery_list.hpp index bfef1f52..f408bd0f 100644 --- a/src/gui/control/gallery_list.hpp +++ b/src/gui/control/gallery_list.hpp @@ -59,6 +59,7 @@ class GalleryList : public wxScrolledWindow { void onLeftDClick(wxMouseEvent& ev); void onChar(wxKeyEvent& ev); void onPaint(wxPaintEvent&); + void onSize(wxSizeEvent&); void OnDraw(DC& dc); /// Find the item corresponding to the given location