mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 04:57:00 -04:00
Fixed crash with new thread-safety code (primarily on watermarks)
Actually added only showing "open recent set" if exists Removed a call to deprecated functions. git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@415 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
@@ -39,11 +39,12 @@ WelcomeWindow::WelcomeWindow()
|
||||
wxControl* open_last = nullptr;
|
||||
if (!settings.recent_sets.empty()) {
|
||||
wxFileName n(settings.recent_sets.front());
|
||||
#ifdef USE_HOVERBUTTON
|
||||
open_last = new HoverButtonExt(this, ID_FILE_RECENT, load_resource_image(_("welcome_last")), _BUTTON_("last opened set"), _("Open '") + n.GetName() + _("'"));
|
||||
#else
|
||||
open_last = new wxButton(this, ID_FILE_RECENT, _BUTTON_("last opened set"));
|
||||
#endif
|
||||
if (n.FileExists())
|
||||
#ifdef USE_HOVERBUTTON
|
||||
open_last = new HoverButtonExt(this, ID_FILE_RECENT, load_resource_image(_("welcome_last")), _BUTTON_("last opened set"), _("Open '") + n.GetName() + _("'"));
|
||||
#else
|
||||
open_last = new wxButton(this, ID_FILE_RECENT, _BUTTON_("last opened set"));
|
||||
#endif
|
||||
}
|
||||
|
||||
wxSizer* s1 = new wxBoxSizer(wxHORIZONTAL);
|
||||
@@ -60,10 +61,9 @@ WelcomeWindow::WelcomeWindow()
|
||||
|
||||
void WelcomeWindow::onPaint(wxPaintEvent&) {
|
||||
wxBufferedPaintDC dc(this);
|
||||
dc.BeginDrawing();
|
||||
draw(dc);
|
||||
dc.EndDrawing();
|
||||
}
|
||||
|
||||
void WelcomeWindow::draw(DC& dc) {
|
||||
wxSize ws = GetClientSize();
|
||||
// draw background
|
||||
|
||||
Reference in New Issue
Block a user