Skip to content

Commit

Permalink
Merged branch stable into stable
Browse files Browse the repository at this point in the history
  • Loading branch information
sirjuddington committed Sep 26, 2016
2 parents 650fe41 + 48762a3 commit 0e5c7a6
Show file tree
Hide file tree
Showing 9 changed files with 44 additions and 18 deletions.
8 changes: 4 additions & 4 deletions build/msvc/SLADE.rc
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ IDI_ICON1 ICON "slade.ico"
//

VS_VERSION_INFO VERSIONINFO
FILEVERSION 3,1,1,3
PRODUCTVERSION 3,1,1,3
FILEVERSION 3,1,1,4
PRODUCTVERSION 3,1,1,4
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
Expand All @@ -77,12 +77,12 @@ BEGIN
BLOCK "0c0904b0"
BEGIN
VALUE "FileDescription", "SLADE"
VALUE "FileVersion", "3.1.1.3"
VALUE "FileVersion", "3.1.1.4"
VALUE "InternalName", "SLADE.exe"
VALUE "LegalCopyright", "Copyright (C) 2016"
VALUE "OriginalFilename", "SLADE.exe"
VALUE "ProductName", "SLADE"
VALUE "ProductVersion", "3.1.1.3"
VALUE "ProductVersion", "3.1.1.4"
END
END
BLOCK "VarFileInfo"
Expand Down
4 changes: 2 additions & 2 deletions dist/makebuild.ps1
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
$version = "3113"
$versionstring = "3.1.1.3"
$version = "3114"
$versionstring = "3.1.1.4"

# Check for 7-zip install
$7zpath = "$env:ProgramFiles\7-Zip\7z.exe"
Expand Down
4 changes: 2 additions & 2 deletions src/Application/MainApp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ namespace Global
string error = "";

int beta_num = 0;
int version_num = 3113;
string version = "3.1.1.3";
int version_num = 3114;
string version = "3.1.1.4";
#ifdef GIT_DESCRIPTION
string sc_rev = GIT_DESCRIPTION;
#else
Expand Down
3 changes: 3 additions & 0 deletions src/MapEditor/MapEditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4526,6 +4526,9 @@ void MapEditor::resetOffsets3d()
*******************************************************************/
void MapEditor::toggleUnpegged3d(bool lower)
{
if (selection_3d.size() == 0 && hilight_3d.index < 0)
return;

// Get items to process
vector<selection_3d_t> items;
if (selection_3d.size() == 0)
Expand Down
5 changes: 5 additions & 0 deletions src/MapEditor/MapEditorWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -706,8 +706,10 @@ void MapEditorWindow::buildNodes(Archive* wad)
wxArrayString out;
wxLogMessage("execute \"%s %s\"", builder.path, command);
theApp->SetTopWindow(this);
wxWindow* focus = wxWindow::FindFocus();
wxExecute(S_FMT("\"%s\" %s", builder.path, command), out, wxEXEC_HIDE_CONSOLE);
theApp->SetTopWindow(theMainWindow);
focus->SetFocusFromKbd();
wxLogMessage("Nodebuilder output:");
for (unsigned a = 0; a < out.size(); a++)
wxLogMessage(out[a]);
Expand Down Expand Up @@ -938,6 +940,9 @@ void MapEditorWindow::closeMap()
*******************************************************************/
void MapEditorWindow::forceRefresh(bool renderer)
{
if (!IsShown())
return;

if (renderer) map_canvas->forceRefreshRenderer();
map_canvas->Refresh();
}
Expand Down
3 changes: 3 additions & 0 deletions src/MapEditor/UI/MapCanvas.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2361,6 +2361,9 @@ void MapCanvas::forceRefreshRenderer()
info_3d.update(hl.index, hl.type, &(editor->getMap()));
}

if (!setActive())
return;

renderer_2d->forceUpdate();
renderer_3d->clearData();
}
Expand Down
30 changes: 22 additions & 8 deletions src/UI/Canvas/OGLCanvas.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,26 @@ wxWindow* OGLCanvas::toPanel(wxWindow* parent)
return panel;
}

/* OGLCanvas::setActive
* Activates the GL context for this canvas. Returns false if setting
* the active context failed
*******************************************************************/
bool OGLCanvas::setActive()
{
#ifdef USE_SFML_RENDERWINDOW
if (!sf::RenderWindow::setActive())
return false;

Drawing::setRenderTarget(this);
resetGLStates();
setView(sf::View(sf::FloatRect(0.0f, 0.0f, GetSize().x, GetSize().y)));

return true;
#else
return setContext();
#endif
}


/*******************************************************************
* OGLCANVAS EVENTS
Expand All @@ -272,14 +292,8 @@ void OGLCanvas::onPaint(wxPaintEvent& e)
if (IsShown())
{
// Set context to this window
#ifdef USE_SFML_RENDERWINDOW
sf::RenderWindow::setActive();
Drawing::setRenderTarget(this);
resetGLStates();
setView(sf::View(sf::FloatRect(0.0f, 0.0f, GetSize().x, GetSize().y)));
#else
setContext();
#endif
if (!setActive())
return;

// Init if needed
if (!init_done)
Expand Down
1 change: 1 addition & 0 deletions src/UI/Canvas/OGLCanvas.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ class OGLCanvas : public wxGLCanvas
virtual void update(long frametime) {}
void drawCheckeredBackground();
wxWindow* toPanel(wxWindow* parent);
bool setActive();

#ifdef USE_SFML_RENDERWINDOW
void SwapBuffers() { display(); }
Expand Down
4 changes: 2 additions & 2 deletions win_installer/SLADE.iss
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!

#define MyAppName "SLADE"
#define MyAppVersion "3.1.1.3"
#define VersionNum "3113"
#define MyAppVersion "3.1.1.4"
#define VersionNum "3114"
#define MyAppURL "http://slade.mancubus.net"
#define MyAppExeName "SLADE.exe"

Expand Down

0 comments on commit 0e5c7a6

Please sign in to comment.