Fix Canvas Size availability
This commit is contained in:
parent
7f444c8c96
commit
a2903da89f
4 changed files with 14 additions and 14 deletions
|
@ -1585,7 +1585,6 @@ void TCellSelection::selectCell(int row, int col) {
|
|||
|
||||
void TCellSelection::selectNone() {
|
||||
m_range = Range();
|
||||
CommandManager::instance()->enable(MI_CanvasSize, false);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
|
|
@ -855,8 +855,15 @@ void FilmstripFrames::mousePressEvent(QMouseEvent *event) {
|
|||
|
||||
TXshSimpleLevel *sl = getLevel();
|
||||
|
||||
CommandManager::instance()->enable(MI_CanvasSize, false);
|
||||
|
||||
if (!sl) return;
|
||||
|
||||
bool isRasterLevel =
|
||||
(sl->getType() == TZP_XSHLEVEL || sl->getType() == OVL_XSHLEVEL ||
|
||||
sl->getType() == TZI_XSHLEVEL);
|
||||
CommandManager::instance()->enable(MI_CanvasSize, isRasterLevel);
|
||||
|
||||
// If accessed after 1st frame on a Single Frame level
|
||||
// Block movement so we can't create new images
|
||||
if (index > 0) {
|
||||
|
|
|
@ -146,11 +146,6 @@ void TFilmstripSelection::select(const TFrameId &fid, bool selected) {
|
|||
if (tool) tool->setSelectedFrames(m_selectedFrames);
|
||||
|
||||
TXshSimpleLevel *sl = app->getCurrentLevel()->getSimpleLevel();
|
||||
bool rasterLevel = sl->getType() == TZP_XSHLEVEL ||
|
||||
sl->getType() == OVL_XSHLEVEL ||
|
||||
sl->getType() == TZI_XSHLEVEL;
|
||||
|
||||
CommandManager::instance()->enable(MI_CanvasSize, rasterLevel);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
@ -165,7 +160,6 @@ void TFilmstripSelection::selectNone() {
|
|||
m_selectedFrames.clear();
|
||||
updateInbetweenRange();
|
||||
TXshSimpleLevel *sl = TApp::instance()->getCurrentLevel()->getSimpleLevel();
|
||||
CommandManager::instance()->enable(MI_CanvasSize, false);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
@ -180,10 +174,6 @@ void TFilmstripSelection::selectAll() {
|
|||
updateInbetweenRange();
|
||||
TTool *tool = TApp::instance()->getCurrentTool()->getTool();
|
||||
tool->setSelectedFrames(m_selectedFrames);
|
||||
bool rasterLevel = sl->getType() == TZP_XSHLEVEL ||
|
||||
sl->getType() == OVL_XSHLEVEL ||
|
||||
sl->getType() == TZI_XSHLEVEL;
|
||||
CommandManager::instance()->enable(MI_CanvasSize, rasterLevel);
|
||||
notifyView();
|
||||
}
|
||||
|
||||
|
@ -204,9 +194,6 @@ void TFilmstripSelection::invertSelection() {
|
|||
updateInbetweenRange();
|
||||
TTool *tool = TApp::instance()->getCurrentTool()->getTool();
|
||||
tool->setSelectedFrames(m_selectedFrames);
|
||||
if (sl->getType() == TZP_XSHLEVEL || sl->getType() == OVL_XSHLEVEL ||
|
||||
sl->getType() == TZI_XSHLEVEL)
|
||||
CommandManager::instance()->enable(MI_CanvasSize, true);
|
||||
notifyView();
|
||||
}
|
||||
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
#include "cellselection.h"
|
||||
#include "sceneviewer.h"
|
||||
#include "statusbar.h"
|
||||
#include "menubarcommandids.h"
|
||||
|
||||
// TnzTools includes
|
||||
#include "tools/tool.h"
|
||||
|
@ -566,6 +567,7 @@ void TApp::onColumnIndexSwitched() {
|
|||
|
||||
void TApp::onXshLevelSwitched(TXshLevel *) {
|
||||
TXshLevel *level = m_currentLevel->getLevel();
|
||||
CommandManager::instance()->enable(MI_CanvasSize, false);
|
||||
if (level) {
|
||||
TXshSimpleLevel *simpleLevel = level->getSimpleLevel();
|
||||
|
||||
|
@ -581,6 +583,11 @@ void TApp::onXshLevelSwitched(TXshLevel *) {
|
|||
currentPalette->isCleanupPalette())
|
||||
m_paletteController->editCleanupPalette();
|
||||
|
||||
bool isRasterLevel = (simpleLevel->getType() == TZP_XSHLEVEL ||
|
||||
simpleLevel->getType() == OVL_XSHLEVEL ||
|
||||
simpleLevel->getType() == TZI_XSHLEVEL);
|
||||
CommandManager::instance()->enable(MI_CanvasSize, isRasterLevel);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue