From 7e2fe77836526aa3e4f09221913b95a341768ef6 Mon Sep 17 00:00:00 2001 From: Mikhail Korolev Date: Thu, 15 Sep 2016 19:03:07 +0300 Subject: [PATCH 1/4] apps/wizard: (trivial) fix misplaced arguments in installFile for installFiles --- apps/wizard/unshield/unshieldworker.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/wizard/unshield/unshieldworker.cpp b/apps/wizard/unshield/unshieldworker.cpp index c8f7ca677..d3ccfe03a 100644 --- a/apps/wizard/unshield/unshieldworker.cpp +++ b/apps/wizard/unshield/unshieldworker.cpp @@ -302,7 +302,7 @@ bool Wizard::UnshieldWorker::copyDirectory(const QString &source, const QString bool Wizard::UnshieldWorker::installFile(const QString &fileName, const QString &path, Qt::MatchFlags flags, bool keepSource) { - return installFiles(fileName, path, flags, true, keepSource); + return installFiles(fileName, path, flags, keepSource, true); } bool Wizard::UnshieldWorker::installFiles(const QString &fileName, const QString &path, Qt::MatchFlags flags, bool keepSource, bool single) From 7bd445fb8389f6867159448f8829d96f00e6c171 Mon Sep 17 00:00:00 2001 From: scrawl Date: Sat, 17 Sep 2016 17:21:35 +0200 Subject: [PATCH 2/4] Don't crash if FontManager::getByName returns NULL (Fixes #3552) --- apps/openmw/mwgui/bookpage.cpp | 7 +++++-- apps/openmw/mwgui/formatting.cpp | 5 ++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/apps/openmw/mwgui/bookpage.cpp b/apps/openmw/mwgui/bookpage.cpp index dbd829176..0f412042b 100644 --- a/apps/openmw/mwgui/bookpage.cpp +++ b/apps/openmw/mwgui/bookpage.cpp @@ -275,9 +275,12 @@ struct TypesetBookImpl::Typesetter : BookTypesetter if (i->match (fontName, fontColour, fontColour, fontColour, 0)) return &*i; - StyleImpl & style = *mBook->mStyles.insert (mBook->mStyles.end (), StyleImpl ()); + MyGUI::IFont* font = MyGUI::FontManager::getInstance().getByName(fontName); + if (!font) + throw std::runtime_error(std::string("can't find font ") + fontName); - style.mFont = MyGUI::FontManager::getInstance().getByName(fontName); + StyleImpl & style = *mBook->mStyles.insert (mBook->mStyles.end (), StyleImpl ()); + style.mFont = font; style.mHotColour = fontColour; style.mActiveColour = fontColour; style.mNormalColour = fontColour; diff --git a/apps/openmw/mwgui/formatting.cpp b/apps/openmw/mwgui/formatting.cpp index 6a8145e97..b7e24a7ee 100644 --- a/apps/openmw/mwgui/formatting.cpp +++ b/apps/openmw/mwgui/formatting.cpp @@ -413,7 +413,10 @@ namespace MWGui int TextElement::currentFontHeight() const { std::string fontName(mTextStyle.mFont == "Default" ? MyGUI::FontManager::getInstance().getDefaultFont() : mTextStyle.mFont); - return MyGUI::FontManager::getInstance().getByName(fontName)->getDefaultHeight(); + MyGUI::IFont* font = MyGUI::FontManager::getInstance().getByName(fontName); + if (!font) + return 0; + return font->getDefaultHeight(); } int TextElement::getHeight() From 767eb1257a1f054b26938487d26e143778f8d35d Mon Sep 17 00:00:00 2001 From: scrawl Date: Sat, 17 Sep 2016 18:10:17 +0200 Subject: [PATCH 3/4] Update AUTHORS.md --- AUTHORS.md | 1 + 1 file changed, 1 insertion(+) diff --git a/AUTHORS.md b/AUTHORS.md index 17c20e73d..204d45258 100644 --- a/AUTHORS.md +++ b/AUTHORS.md @@ -123,6 +123,7 @@ Programmers smbas Stefan Galowicz (bogglez) Stanislav Bobrov (Jiub) + stil-t svaante Sylvain Thesnieres (Garvek) t6 From 8f5347b79b48659e3a6f9847dcedd8493a1c6c2b Mon Sep 17 00:00:00 2001 From: scrawl Date: Sat, 17 Sep 2016 18:31:39 +0200 Subject: [PATCH 4/4] Update comment, osgAnimation::RigGeometry is no longer used --- components/nifosg/userdata.hpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/components/nifosg/userdata.hpp b/components/nifosg/userdata.hpp index 9770890b0..42fcaff47 100644 --- a/components/nifosg/userdata.hpp +++ b/components/nifosg/userdata.hpp @@ -38,8 +38,7 @@ namespace NifOsg // Decomposing the original components from the 4x4 matrix isn't possible, which causes // problems when a KeyframeController wants to change only one of these components. So // we store the scale and rotation components separately here. - // Note for a cleaner solution it would be possible to write a custom Transform node, - // but then we have to fork osgAnimation :/ + // Note for a cleaner solution it would be possible to write a custom Transform node float mScale; Nif::Matrix3 mRotationScale; };