tahoma2d/toonz/sources/toonzlib/txsheethandle.cpp

36 lines
1 KiB
C++
Raw Normal View History

2016-03-19 06:57:51 +13:00
// TnzLib includes
#include "toonz/textureutils.h"
#include "toonz/txsheethandle.h"
//=============================================================================
// TXsheeHandle
//-----------------------------------------------------------------------------
2021-04-28 14:02:23 +12:00
TXsheetHandle::TXsheetHandle() : m_xsheet(0), m_zoomFactor(100) {}
2016-03-19 06:57:51 +13:00
//-----------------------------------------------------------------------------
2016-06-15 18:43:10 +12:00
TXsheetHandle::~TXsheetHandle() {}
2016-03-19 06:57:51 +13:00
//-----------------------------------------------------------------------------
2016-06-15 18:43:10 +12:00
TXsheet *TXsheetHandle::getXsheet() const { return m_xsheet; }
2016-03-19 06:57:51 +13:00
//-----------------------------------------------------------------------------
2016-06-15 18:43:10 +12:00
void TXsheetHandle::setXsheet(TXsheet *xsheet) {
if (m_xsheet == xsheet) return;
2016-03-19 06:57:51 +13:00
2016-06-15 18:43:10 +12:00
m_xsheet = xsheet;
2016-03-19 06:57:51 +13:00
2016-06-15 18:43:10 +12:00
if (m_xsheet) {
texture_utils::invalidateTextures(m_xsheet); // We'll be editing m_xsheet -
// so destroy every texture of
// his
emit xsheetSwitched();
}
2016-03-19 06:57:51 +13:00
}