OT changes as of 7/22 (#94)

This commit is contained in:
Jeremy Bullock 2020-07-25 22:23:46 -07:00 committed by GitHub
parent 7e0ba3c713
commit f5da61aa1b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 62 additions and 4 deletions

View file

@ -0,0 +1,36 @@
License Agreement For Tahoma
[https://github.com/turtletooth/tahoma]
- - - - - - - - - - - - - - - -
Tahoma
All contributions by Jeremy Bullock:
Copyright (c) 2016 - 2020, Jeremy Bullock
All rights reserved.
All contributions by DWANGO:
Copyright (c) 2016 - 2020, DWANGO Co., Ltd.
All rights reserved.
All other contributions:
Copyright (c) 2016 - 2020, the respective contributors.
All rights reserved.
Each contributor holds copyright over their respective contributions.
The project versioning (Git) records all such contribution source information.
LICENSE
BSD 3-Clause "New" or "Revised" License
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

View file

@ -169,6 +169,7 @@ protected slots:
void setIsLocked(bool lock);
void onSwitchToPage(int pageIndex);
void onShowNewStyleButtonToggled();
private:
void setSaveDefaultText(QAction *action, int levelType);

View file

@ -1815,7 +1815,11 @@ void TStageObject::loadData(TIStream &is) {
for (; itKfInd != keyframeIndexSet.end(); itKfInd++)
setkey(m_scale, *itKfInd);
}
updateKeyframes();
// Calling updateKeyframes() here may cause failure to load expressions
// especially if it refers to a curve which is to be loaded AFTER this
// function while loading scene process. So I will skip it assuming that
// updateKeyframes() will be called when it is actually needed.
// updateKeyframes();
if (m_spline != 0 && isUppkEnabled())
m_spline->addParam(m_posPath.getPointer());
invalidate();

View file

@ -27,6 +27,7 @@
// TnzCore includes
#include "tconvert.h"
#include "tsystem.h"
#include "tenv.h"
// Qt includes
#include <QVBoxLayout>
@ -40,6 +41,7 @@
#include <QLabel>
#include <QDrag>
TEnv::IntVar ShowNewStyleButton("ShowNewStyleButton", 1);
using namespace PaletteViewerGUI;
//=============================================================================
@ -1296,3 +1298,17 @@ void PaletteViewer::setIsLocked(bool lock) {
void PaletteViewer::onSwitchToPage(int pageIndex) {
m_pagesBar->setCurrentIndex(pageIndex);
}
//-----------------------------------------------------------------------------
void PaletteViewer::onShowNewStyleButtonToggled() {
ShowNewStyleButton = (ShowNewStyleButton == 1) ? 0 : 1;
QAction *act = dynamic_cast<QAction *>(sender());
if (act) {
QString str = (ShowNewStyleButton) ? tr("Hide New Style Button")
: tr("Show New Style Button");
act->setText(str);
}
m_pageViewer->computeSize();
m_pageViewer->update();
}

View file

@ -40,6 +40,7 @@
// enable to set font size for style name separately from other texts
TEnv::IntVar EnvSoftwareCurrentFontSize_StyleName(
"SoftwareCurrentFontSize_StyleName", 11);
extern TEnv::IntVar ShowNewStyleButton;
TEnv::IntVar ShowStyleIndex("ShowStyleIndex", 0);
@ -573,9 +574,9 @@ void PageViewer::drawToggleLink(QPainter &p, QRect &chipRect,
//-----------------------------------------------------------------------------
/*! Draw the chip name \b name inside rectangle \b chipRect using painter \b p.
* If the name is too wide to fit on the chip, use left align - to show the
* start of the name. Otherwise, use center align.
*/
* If the name is too wide to fit on the chip, use left align - to show the
* start of the name. Otherwise, use center align.
*/
static void drawChipName(QPainter &p, const QRect &chipRect,
const std::wstring &name) {
const QString nameQString = QString::fromStdWString(name);