Fix layout errors and crash with Atlas terrain previews.
Fix warning. This was SVN commit r8103.
This commit is contained in:
parent
c8eaee35cc
commit
f3c9a59d29
@ -78,9 +78,12 @@ function TerrainPreviewPage(panel, name)
|
||||
}
|
||||
TerrainPreviewPage.prototype = {
|
||||
reloadPreviews: function() {
|
||||
this.panel.freeze();
|
||||
this.scrolled.destroyChildren();
|
||||
this.itemSizer.clear();
|
||||
|
||||
lastTerrainSelection = null; // clear any reference to deleted window
|
||||
|
||||
// TODO: Do something clever like load the preview images asynchronously,
|
||||
// to avoid the annoying freeze when switching tabs
|
||||
var previews = Atlas.Message.GetTerrainGroupPreviews(this.name, this.w, this.h).previews;
|
||||
@ -106,7 +109,9 @@ TerrainPreviewPage.prototype = {
|
||||
this.itemSizer.add(imgSizer, 0, wxAlignment.CENTRE | wxStretch.EXPAND);
|
||||
}
|
||||
|
||||
this.itemSizer.layout();
|
||||
this.panel.layout();
|
||||
this.panel.thaw();
|
||||
|
||||
// If not all textures were loaded yet, run a timer to reload the previews
|
||||
// every so often until they've all finished
|
||||
|
@ -230,7 +230,7 @@ namespace
|
||||
|
||||
template<> struct ToJSVal<bool>
|
||||
{
|
||||
static jsval Convert(JSContext* cx, const bool& val)
|
||||
static jsval Convert(JSContext* WXUNUSED(cx), const bool& val)
|
||||
{
|
||||
return val ? JSVAL_TRUE : JSVAL_FALSE;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user