Merge pull request #1099 from manongjohn/ot_patches_20221202
OpenToonz Fix Patches thru 12/2/2022
This commit is contained in:
commit
e90463919f
19 changed files with 1533 additions and 64 deletions
|
@ -1,7 +1,7 @@
|
|||
|
||||
|
||||
#ifdef _WIN32
|
||||
//#define UNICODE // per le funzioni di conversione da/a UNC
|
||||
// #define UNICODE // per le funzioni di conversione da/a UNC
|
||||
#include <windows.h>
|
||||
#include <lm.h>
|
||||
|
||||
|
@ -279,8 +279,7 @@ void TFilePath::setPath(std::wstring path) {
|
|||
}
|
||||
} else if (isSlash(path[pos])) {
|
||||
int firstSlashPos = pos;
|
||||
do
|
||||
pos++;
|
||||
do pos++;
|
||||
while (pos < length && isSlash(path[pos]));
|
||||
if (firstSlashPos == 0 && pos == 4) // Caso "\\\\MachineName"
|
||||
m_path.append(2, wslash);
|
||||
|
@ -1066,9 +1065,9 @@ QString TFilePath::fidRegExpStr() {
|
|||
QString suffixLetter = (m_acceptNonAlphabetSuffix)
|
||||
? "[^\\._ \\\\/:,;*?\"<>|0123456789]"
|
||||
: "[a-zA-Z]";
|
||||
QString countLetter = (m_letterCountForSuffix == 0)
|
||||
? "{0,}"
|
||||
: (QString("{0,%1}").arg(m_letterCountForSuffix));
|
||||
QString countLetter = (m_letterCountForSuffix == 0)
|
||||
? "{0,}"
|
||||
: (QString("{0,%1}").arg(m_letterCountForSuffix));
|
||||
return QString("(\\d+)(%1%2)").arg(suffixLetter).arg(countLetter);
|
||||
// const QString fIdRegExp("(\\d+)([a-zA-Z]?)");
|
||||
}
|
||||
|
@ -1113,8 +1112,9 @@ TFilePath::TFilePathInfo TFilePath::analyzePath() const {
|
|||
|
||||
// hogehoge.0001a.jpg
|
||||
// empty frame case : hogehoge..jpg
|
||||
QRegExp rx("^" + levelNameRegExp + sepCharRegExp + "(?:" + fIdRegExp + ")?" +
|
||||
"\\." + extensionRegExp + "$");
|
||||
// empty level name case : ..jpg .0001a.jpg
|
||||
QRegExp rx("^(?:" + levelNameRegExp + ")?" + sepCharRegExp +
|
||||
"(?:" + fIdRegExp + ")?" + "\\." + extensionRegExp + "$");
|
||||
if (rx.indexIn(fileName) != -1) {
|
||||
assert(rx.captureCount() == 5);
|
||||
info.levelName = rx.cap(1);
|
||||
|
|
|
@ -63,6 +63,7 @@ if(NOT BUILD_TARGET_BSD)
|
|||
tif/tiio_tif.cpp
|
||||
tzp/tiio_plt.cpp
|
||||
tzp/tiio_tzp.cpp
|
||||
tzp/toonzrle.cpp
|
||||
tzp/avl.c
|
||||
)
|
||||
endif()
|
||||
|
|
1426
toonz/sources/image/tzp/toonzrle.cpp
Normal file
1426
toonz/sources/image/tzp/toonzrle.cpp
Normal file
File diff suppressed because it is too large
Load diff
|
@ -65,7 +65,7 @@ class TParamVarT final : public TParamVar {
|
|||
public:
|
||||
TParamVarT(std::string name, T *var = nullptr, TParamP pluginVar = 0,
|
||||
bool hidden = false, bool obsolete = false)
|
||||
: TParamVar(name, hidden), m_var(var), m_pluginVar(pluginVar) {}
|
||||
: TParamVar(name, hidden, obsolete), m_var(var), m_pluginVar(pluginVar) {}
|
||||
TParamVarT() = delete;
|
||||
void setParam(TParam *param) {
|
||||
if (m_var)
|
||||
|
@ -80,7 +80,8 @@ public:
|
|||
return m_pluginVar.getPointer();
|
||||
}
|
||||
TParamVar *clone() const {
|
||||
return new TParamVarT<T>(getName(), m_var, m_pluginVar, isHidden());
|
||||
return new TParamVarT<T>(getName(), m_var, m_pluginVar, isHidden(),
|
||||
isObsolete());
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -362,8 +362,8 @@ int igs::rotate_blur::reference_margin(
|
|||
const double blur_radius, /* ぼかしの始まる半径 */
|
||||
const double spin_radius, /* ゼロ以上でspin指定となり、
|
||||
かつぼかし強弱の一定になる半径となる */
|
||||
const int type // 0: Accelerator, 1: Uniform Angle, 2: Uniform Length
|
||||
) {
|
||||
const int type, // 0: Accelerator, 1: Uniform Angle, 2: Uniform Length
|
||||
const double ellipse_aspect_ratio) {
|
||||
/* 強度のないとき、なにもしない */
|
||||
if (degree <= 0.0) {
|
||||
return 0;
|
||||
|
@ -402,5 +402,13 @@ int igs::rotate_blur::reference_margin(
|
|||
margin1 = margin2;
|
||||
}
|
||||
|
||||
// Consider ellipse deformation.
|
||||
// Instead of precise computing, return the maximum possible value.
|
||||
if (ellipse_aspect_ratio != 1.0) {
|
||||
double axis_x = 2.0 * ellipse_aspect_ratio / (ellipse_aspect_ratio + 1.0);
|
||||
double axis_y = axis_x / ellipse_aspect_ratio;
|
||||
margin1 *= std::max(axis_x, axis_y);
|
||||
}
|
||||
|
||||
return static_cast<int>(ceil(margin1));
|
||||
}
|
||||
|
|
|
@ -44,8 +44,8 @@ IGS_ROTATE_BLUR_EXPORT int reference_margin(
|
|||
const double blur_radius, /* ぼかしの始まる半径 */
|
||||
const double spin_radius, /* ゼロ以上でspin指定となり、
|
||||
かつぼかし強弱の一定になる半径となる */
|
||||
const int type // 0: Accelerator, 1: Uniform Angle, 2: Uniform Length
|
||||
);
|
||||
const int type, // 0: Accelerator, 1: Uniform Angle, 2: Uniform Length
|
||||
const double ellipse_aspect_ratio = 1.0);
|
||||
} // namespace rotate_blur
|
||||
} // namespace igs
|
||||
|
||||
|
|
|
@ -86,8 +86,8 @@ public:
|
|||
static_cast<int>(ceil(bBox.getLy())),
|
||||
static_cast<int>(ceil(bBox.getLx())), center,
|
||||
this->m_blur->getValue(frame), this->m_radius->getValue(frame) * scale,
|
||||
((0 < this->m_type->getValue()) ? 0.0 : (bBox.getLy() / 2.0)),
|
||||
this->m_type->getValue());
|
||||
bBox.getLy() / 2.0, this->m_type->getValue(),
|
||||
this->m_ellipse_aspect_ratio->getValue(frame));
|
||||
}
|
||||
void get_render_enlarge(const double frame, const TAffine affine,
|
||||
TRectD &bBox) {
|
||||
|
|
|
@ -163,9 +163,9 @@ void BokehUtils::MyThread::setLayerRaster(const RASTER srcRas,
|
|||
PIXEL* pix = srcRas->pixels(j);
|
||||
for (int i = 0; i < dim.lx; i++, pix++) {
|
||||
if (pix->m != 0) {
|
||||
double val = (m_channel == Red) ? (double)pix->r
|
||||
: (m_channel == Green) ? (double)pix->g
|
||||
: (double)pix->b;
|
||||
double val = (m_channel == Red) ? (double)pix->r
|
||||
: (m_channel == Green) ? (double)pix->g
|
||||
: (double)pix->b;
|
||||
// multiply the exposure by alpha channel value
|
||||
dstMem[j * dim.lx + i].r =
|
||||
valueToExposure(val / (double)PIXEL::maxChannelValue,
|
||||
|
@ -264,9 +264,9 @@ void BokehUtils::MyThread::run() {
|
|||
std::pow(exposure / (*alp_p), m_layerHardness / m_masterHardness) *
|
||||
(*alp_p);
|
||||
|
||||
double* res = (m_channel == Red) ? (&((*res_p).x))
|
||||
: (m_channel == Green) ? (&((*res_p).y))
|
||||
: (&((*res_p).z));
|
||||
double* res = (m_channel == Red) ? (&((*res_p).x))
|
||||
: (m_channel == Green) ? (&((*res_p).y))
|
||||
: (&((*res_p).z));
|
||||
|
||||
// composite exposure
|
||||
if ((*alp_p) >= 1.0 || (*res) == 0.0)
|
||||
|
@ -1280,22 +1280,26 @@ void BokehUtils::setOutputRaster(double4* src, const RASTER dstRas,
|
|||
outPix->r =
|
||||
(typename PIXEL::Channel)((val > (double)PIXEL::maxChannelValue)
|
||||
? (double)PIXEL::maxChannelValue
|
||||
: val);
|
||||
: (val < 0.) ? 0.
|
||||
: val);
|
||||
val = (*src_p).y * (double)PIXEL::maxChannelValue + 0.5;
|
||||
outPix->g =
|
||||
(typename PIXEL::Channel)((val > (double)PIXEL::maxChannelValue)
|
||||
? (double)PIXEL::maxChannelValue
|
||||
: val);
|
||||
: (val < 0.) ? 0.
|
||||
: val);
|
||||
val = (*src_p).z * (double)PIXEL::maxChannelValue + 0.5;
|
||||
outPix->b =
|
||||
(typename PIXEL::Channel)((val > (double)PIXEL::maxChannelValue)
|
||||
? (double)PIXEL::maxChannelValue
|
||||
: val);
|
||||
: (val < 0.) ? 0.
|
||||
: val);
|
||||
val = (*src_p).w * (double)PIXEL::maxChannelValue + 0.5;
|
||||
outPix->m =
|
||||
(typename PIXEL::Channel)((val > (double)PIXEL::maxChannelValue)
|
||||
? (double)PIXEL::maxChannelValue
|
||||
: val);
|
||||
: (val < 0.) ? 0.
|
||||
: val);
|
||||
}
|
||||
src_p += margin.x;
|
||||
}
|
||||
|
|
|
@ -163,9 +163,8 @@ void Iwa_BokehFx::doCompute(TTile& tile, double frame,
|
|||
QList<LayerValue> layerValues;
|
||||
for (auto index : sourceIndices) {
|
||||
LayerValue layerValue;
|
||||
layerValue.sourceTile = sourceTiles[index];
|
||||
layerValue.premultiply =
|
||||
m_layerParams[index].m_premultiply->getValue() ? 1 : 0;
|
||||
layerValue.sourceTile = sourceTiles[index];
|
||||
layerValue.premultiply = m_layerParams[index].m_premultiply->getValue();
|
||||
layerValue.layerHardness = masterHardness;
|
||||
layerValue.depth_ref = 0;
|
||||
layerValue.irisSize = irisSizes.value(index);
|
||||
|
|
|
@ -212,7 +212,7 @@ void Iwa_BokehRefFx::doCompute(TTile& tile, double frame,
|
|||
}
|
||||
ctrls[1] = depth_buff;
|
||||
|
||||
layerValue.premultiply = 2; // auto
|
||||
layerValue.premultiply = false;
|
||||
layerValue.layerHardness = m_hardness->getValue(frame);
|
||||
layerValue.depth_ref = 1;
|
||||
layerValue.distance = 0.5;
|
||||
|
|
|
@ -60,7 +60,7 @@ static float* dt(float* f, int n, float a = 1.0f) {
|
|||
delete[] z;
|
||||
return d;
|
||||
}
|
||||
}
|
||||
} // namespace
|
||||
|
||||
//------------------------------------
|
||||
|
||||
|
@ -204,9 +204,10 @@ void Iwa_SoapBubbleFx::doCompute(TTile& tile, double frame,
|
|||
/* obtain shape image */
|
||||
TTile shape_tile;
|
||||
{
|
||||
TRaster32P tmp(1, 1);
|
||||
m_shape->allocateAndCompute(shape_tile, bBox.getP00(), dim, tmp, frame,
|
||||
settings);
|
||||
TRenderSettings settings_aux(settings);
|
||||
settings_aux.m_bpp = 32;
|
||||
m_shape->allocateAndCompute(shape_tile, bBox.getP00(), dim, nullptr,
|
||||
frame, settings_aux);
|
||||
}
|
||||
|
||||
if (checkCancelAndReleaseRaster(allocatedRasList, tile, settings)) return;
|
||||
|
@ -530,7 +531,7 @@ int Iwa_SoapBubbleFx::do_binarize(TRaster32P srcRas, USHORT* dst_p, float thres,
|
|||
}
|
||||
|
||||
QList<int> lut;
|
||||
for (int i = 0; i < 65536; i++) lut.append(i);
|
||||
for (int i = 0; i < 65536; i++) lut.append(i);
|
||||
tmp_p = dst_p;
|
||||
int regionCount = 0;
|
||||
for (int j = 0; j < dim.ly; j++) {
|
||||
|
@ -569,7 +570,7 @@ int Iwa_SoapBubbleFx::do_binarize(TRaster32P srcRas, USHORT* dst_p, float thres,
|
|||
} else
|
||||
convIndex.append(i);
|
||||
}
|
||||
for (int i = 0; i < convIndex.count(); i++)
|
||||
for (int i = 0; i < convIndex.count(); i++)
|
||||
lut[convIndex.at(i)] = lut.at(lut.at(convIndex.at(i)));
|
||||
|
||||
// apply lut
|
||||
|
@ -577,7 +578,7 @@ int Iwa_SoapBubbleFx::do_binarize(TRaster32P srcRas, USHORT* dst_p, float thres,
|
|||
tmp_p = dst_p;
|
||||
for (int j = 0; j < dim.ly; j++) {
|
||||
for (int i = 0; i < dim.lx; i++, tmp_p++) {
|
||||
(*tmp_p) = lut[*tmp_p];
|
||||
(*tmp_p) = lut[*tmp_p];
|
||||
if (maxRegionIndex < (*tmp_p)) maxRegionIndex = (*tmp_p);
|
||||
}
|
||||
}
|
||||
|
@ -789,14 +790,14 @@ void Iwa_SoapBubbleFx::calc_norm_angle(float* norm_angle_p, float* depth_map_p,
|
|||
float* dst_p = norm_angle_p;
|
||||
|
||||
for (int j = 0; j < dim.ly; j++) {
|
||||
int sample_y[2] = {j - sampleDistance, j + sampleDistance};
|
||||
int sample_y[2] = {j - sampleDistance, j + sampleDistance};
|
||||
if (sample_y[0] < 0) sample_y[0] = 0;
|
||||
if (sample_y[1] >= dim.ly) sample_y[1] = dim.ly - 1;
|
||||
|
||||
for (int i = 0; i < dim.lx; i++, norm_angle_p++) {
|
||||
int sample_x[2] = {i - sampleDistance, i + sampleDistance};
|
||||
if (sample_x[1] >= dim.lx) sample_x[1] = dim.lx - 1;
|
||||
if (sample_x[0] < 0) sample_x[0] = 0;
|
||||
if (sample_x[0] < 0) sample_x[0] = 0;
|
||||
|
||||
float gradient[2];
|
||||
gradient[0] =
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
#include "toonz/txshcolumn.h"
|
||||
#include "toonz/tlog.h"
|
||||
#include "toonz/imagestyles.h"
|
||||
#include "toonz/filepathproperties.h"
|
||||
|
||||
// TnzBase includes
|
||||
#include "tcli.h"
|
||||
|
@ -596,6 +597,12 @@ int main(int argc, char *argv[]) {
|
|||
|
||||
cout << "project:" << project->getName() << endl;
|
||||
|
||||
// update TFilePath condition on loading the current project
|
||||
FilePathProperties *fpProp = project->getFilePathProperties();
|
||||
TFilePath::setFilePathProperties(fpProp->useStandard(),
|
||||
fpProp->acceptNonAlphabetSuffix(),
|
||||
fpProp->letterCountForSuffix());
|
||||
|
||||
TFilePath fp = srcName;
|
||||
|
||||
/*- CLNファイルを直接指定した場合 -*/
|
||||
|
|
|
@ -33,6 +33,7 @@
|
|||
#include "toonz/levelset.h"
|
||||
#include "toonz/txshsimplelevel.h"
|
||||
#include "toonz/levelproperties.h"
|
||||
#include "toonz/filepathproperties.h"
|
||||
|
||||
// TnzSound includes
|
||||
#include "tnzsound.h"
|
||||
|
@ -50,7 +51,7 @@
|
|||
#include "tunit.h"
|
||||
#include "tenv.h"
|
||||
#include "tpassivecachemanager.h"
|
||||
//#include "tcacheresourcepool.h"
|
||||
// #include "tcacheresourcepool.h"
|
||||
|
||||
// TnzCore includes
|
||||
#include "tsystem.h"
|
||||
|
@ -798,7 +799,7 @@ int main(int argc, char *argv[]) {
|
|||
loadShaderInterfaces(ToonzFolder::getLibraryFolder() +
|
||||
TFilePath("shaders"));
|
||||
|
||||
//#endif
|
||||
// #endif
|
||||
|
||||
//---------------------------------------------------------
|
||||
|
||||
|
@ -828,6 +829,12 @@ int main(int argc, char *argv[]) {
|
|||
m_userLog->info(msg);
|
||||
// pm->setCurrentProject(project, false); // false => temporaneamente
|
||||
|
||||
// update TFilePath condition on loading the current project
|
||||
FilePathProperties *fpProp = project->getFilePathProperties();
|
||||
TFilePath::setFilePathProperties(fpProp->useStandard(),
|
||||
fpProp->acceptNonAlphabetSuffix(),
|
||||
fpProp->letterCountForSuffix());
|
||||
|
||||
Sw1.start();
|
||||
|
||||
if (!TSystem::doesExistFileOrLevel(srcFilePath)) return -2;
|
||||
|
@ -927,13 +934,10 @@ int main(int argc, char *argv[]) {
|
|||
const int threadCounts[3] = {1, procCount / 2, procCount};
|
||||
if (nthreads.isSelected()) {
|
||||
QString threadCountStr = QString::fromStdString(nthreads.getValue());
|
||||
threadCount = (threadCountStr == "single")
|
||||
? threadCounts[0]
|
||||
: (threadCountStr == "half")
|
||||
? threadCounts[1]
|
||||
: (threadCountStr == "all")
|
||||
? threadCounts[2]
|
||||
: threadCountStr.toInt();
|
||||
threadCount = (threadCountStr == "single") ? threadCounts[0]
|
||||
: (threadCountStr == "half") ? threadCounts[1]
|
||||
: (threadCountStr == "all") ? threadCounts[2]
|
||||
: threadCountStr.toInt();
|
||||
|
||||
if (threadCount <= 0) {
|
||||
cout << "Qualifier 'nthreads': bad input" << endl;
|
||||
|
@ -953,15 +957,11 @@ int main(int argc, char *argv[]) {
|
|||
TOutputProperties::MediumVal, TOutputProperties::SmallVal};
|
||||
if (tileSize.isSelected()) {
|
||||
QString tileSizeStr = QString::fromStdString(tileSize.getValue());
|
||||
maxTileSize = (tileSizeStr == "none")
|
||||
? maxTileSizes[0]
|
||||
: (tileSizeStr == "large")
|
||||
? maxTileSizes[1]
|
||||
: (tileSizeStr == "medium")
|
||||
? maxTileSizes[2]
|
||||
: (tileSizeStr == "small")
|
||||
? maxTileSizes[3]
|
||||
: tileSizeStr.toInt();
|
||||
maxTileSize = (tileSizeStr == "none") ? maxTileSizes[0]
|
||||
: (tileSizeStr == "large") ? maxTileSizes[1]
|
||||
: (tileSizeStr == "medium") ? maxTileSizes[2]
|
||||
: (tileSizeStr == "small") ? maxTileSizes[3]
|
||||
: tileSizeStr.toInt();
|
||||
|
||||
if (maxTileSize <= 0) {
|
||||
cout << "Qualifier 'maxtilesize': bad input" << endl;
|
||||
|
|
|
@ -761,7 +761,7 @@ LevelSettingsValues LevelSettingsPopup::getValues(TXshLevelP level) {
|
|||
values.doAntialias = (sl->getProperties()->antialiasSoftness() > 0)
|
||||
? Qt::Checked
|
||||
: Qt::Unchecked;
|
||||
values.softness = sl->getProperties()->antialiasSoftness();
|
||||
values.softness = sl->getProperties()->antialiasSoftness();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1475,6 +1475,7 @@ void LevelSettingsPopup::onSubsamplingChanged() {
|
|||
return;
|
||||
}
|
||||
|
||||
bool somethingChanged = false;
|
||||
TUndoManager::manager()->beginBlock();
|
||||
QSetIterator<TXshLevelP> levelItr(m_selectedLevels);
|
||||
while (levelItr.hasNext()) {
|
||||
|
@ -1491,8 +1492,10 @@ void LevelSettingsPopup::onSubsamplingChanged() {
|
|||
TUndoManager::manager()->add(new LevelSettingsUndo(
|
||||
levelP.getPointer(), LevelSettingsUndo::Subsampling, oldSubsampling,
|
||||
subsampling));
|
||||
somethingChanged = true;
|
||||
}
|
||||
TUndoManager::manager()->endBlock();
|
||||
if (!somethingChanged) return;
|
||||
|
||||
TApp::instance()->getCurrentScene()->setDirtyFlag(true);
|
||||
TApp::instance()
|
||||
|
|
|
@ -1456,6 +1456,7 @@ void PreviewFxManager::onLevelChanged() {
|
|||
// Build the level name as an alias keyword. All cache images associated
|
||||
// with an alias containing the level name will be updated.
|
||||
TXshLevel *xl = TApp::instance()->getCurrentLevel()->getLevel();
|
||||
if (!xl) return;
|
||||
std::string aliasKeyword;
|
||||
TFilePath fp = xl->getPath();
|
||||
aliasKeyword = ::to_string(fp.withType(""));
|
||||
|
|
|
@ -721,8 +721,8 @@ void RowArea::drawShiftTraceMarker(QPainter &p) {
|
|||
|
||||
QPoint frameAdj = m_viewer->getFrameZoomAdjustment();
|
||||
int frameAdj_i = (m_viewer->orientation()->isVerticalTimeline())
|
||||
? frameAdj.y()
|
||||
: frameAdj.x();
|
||||
? frameAdj.y()
|
||||
: frameAdj.x();
|
||||
|
||||
// get onion colors
|
||||
TPixel frontPixel, backPixel;
|
||||
|
@ -1113,7 +1113,8 @@ void RowArea::mouseMoveEvent(QMouseEvent *event) {
|
|||
return;
|
||||
}
|
||||
|
||||
m_row = m_viewer->xyToPosition(pos).frame();
|
||||
m_row = std::max(0, m_viewer->xyToPosition(pos).frame());
|
||||
|
||||
int x = pos.x();
|
||||
|
||||
if ((event->buttons() & Qt::LeftButton) != 0 &&
|
||||
|
|
|
@ -164,6 +164,8 @@ TPropertyGroup *TOutputProperties::getFileFormatProperties(std::string ext) {
|
|||
TPropertyGroup *ret = Tiio::makeWriterProperties(ext);
|
||||
m_formatProperties[ext] = ret;
|
||||
return ret;
|
||||
} else if (ext == "mov" || ext == "3gp") {
|
||||
return it->second;
|
||||
} else {
|
||||
// Try to merge settings instead of overriding them
|
||||
TPropertyGroup *ret = Tiio::makeWriterProperties(ext);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
|
||||
#include <QTimer>
|
||||
|
||||
#include "toonz/tscenehandle.h"
|
||||
|
||||
|
@ -24,7 +24,22 @@ ToonzScene *TSceneHandle::getScene() const { return m_scene; }
|
|||
void TSceneHandle::setScene(ToonzScene *scene) {
|
||||
if (m_scene == scene) return;
|
||||
emit sceneSwitching();
|
||||
delete m_scene;
|
||||
ToonzScene *oldscene = m_scene;
|
||||
m_scene = scene;
|
||||
if (m_scene) emit sceneSwitched();
|
||||
|
||||
// Prevent memory corruption caused by delayed signals writing into the
|
||||
// discarded old scene while that memory was freed.
|
||||
// That made OT had a chance of crashing when project or scene changed rapidly.
|
||||
// Note: This is not the best solution but "it just works"
|
||||
if (oldscene) {
|
||||
QTimer *delayedTimer = new QTimer(this);
|
||||
delayedTimer->setSingleShot(true);
|
||||
|
||||
connect(delayedTimer, &QTimer::timeout, [=]() {
|
||||
delete oldscene;
|
||||
delayedTimer->deleteLater();
|
||||
});
|
||||
delayedTimer->start(3000); // 1 sec was enough, but... dunno about toasters
|
||||
}
|
||||
}
|
||||
|
|
|
@ -570,7 +570,7 @@ void TStyleSelection::selectNone() {
|
|||
//-------------------------------------------------------------------
|
||||
|
||||
bool TStyleSelection::isEmpty() const {
|
||||
return m_pageIndex < 0 && m_styleIndicesInPage.empty();
|
||||
return m_pageIndex < 0 || m_styleIndicesInPage.empty();
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
|
|
Loading…
Reference in a new issue