Skip to content

OpenToonz - An open-source full-featured 2D animation creation software

C

fix #1639 (#1743)

shun-iwasawa171458b32597
diff --git a/.travis.yml b/.travis.yml
index cfc0bd151..88b6f3c25 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,7 +1,6 @@
language: cpp
sudo: required
dist: trusty
-group: deprecated-2017Q4 # temporary uses the previous version
install:
- if [[ $TRAVIS_OS_NAME == "osx" ]]; then bash ci-scripts/osx/travis-install.sh; fi
- if [[ $TRAVIS_OS_NAME == "linux" ]]; then bash ci-scripts/linux/travis-install.sh; fi
diff --git a/toonz/sources/toonzqt/styleselection.cpp b/toonz/sources/toonzqt/styleselection.cpp
index 99f9bb989..071131533 100644
--- a/toonz/sources/toonzqt/styleselection.cpp
+++ b/toonz/sources/toonzqt/styleselection.cpp
@@ -91,18 +91,13 @@ bool pasteStylesDataWithoutUndo(TPalette *palette, TPaletteHandle *pltHandle,
break;
}
- if (palette->getStylePage(styleId) < 0) {
- // styleId non e' utilizzato: uso quello
- // (cut/paste utilizzato per spostare stili)
+ // For now styles will be inserted regardless the styleId of copied styles
+ // are already used in the target palette or not.
+ styleId = palette->getFirstUnpagedStyle();
+ if (styleId >= 0)
palette->setStyle(styleId, style);
- } else {
- // styleId e' gia' utilizzato. ne devo prendere un altro
- styleId = palette->getFirstUnpagedStyle();
- if (styleId >= 0)
- palette->setStyle(styleId, style);
- else
- styleId = palette->addStyle(style);
- }
+ else
+ styleId = palette->addStyle(style);
// check the type of the original(copied) style
// If the original is NormalStyle