Merge remote-tracking branch 'origin/master' into tahoma2d
This commit is contained in:
commit
582b461382
6 changed files with 39 additions and 17 deletions
|
@ -549,7 +549,7 @@ ToonzVectorBrushTool::ToonzVectorBrushTool(std::string name, int targetType)
|
|||
m_autoGroup.setId("AutoGroup");
|
||||
|
||||
m_prop[0].bind(m_autoFill);
|
||||
m_autoFill.setId("AutoFill");
|
||||
m_autoFill.setId("Autofill");
|
||||
|
||||
m_prop[0].bind(m_sendToBack);
|
||||
m_sendToBack.setId("DrawUnder");
|
||||
|
|
|
@ -1765,6 +1765,9 @@ void MainWindow::defineActions() {
|
|||
createRightClickMenuAction(
|
||||
MI_SavePaletteAs, tr("&Save Palette As..."), "",
|
||||
tr("Save the current style palette as a separate file with a new name."));
|
||||
createRightClickMenuAction(
|
||||
MI_SaveStudioPalette, tr("&Save Studio Palette"), "",
|
||||
tr("Save the current Studio Palette."));
|
||||
createRightClickMenuAction(
|
||||
MI_OverwritePalette, tr("&Save Palette"), "",
|
||||
tr("Save the current style palette as a separate file."));
|
||||
|
@ -2724,6 +2727,8 @@ void MainWindow::defineActions() {
|
|||
tr("Brush Tool - Draw Order"), "");
|
||||
createToolOptionsAction("A_ToolOption_Smooth", tr("Smooth"), "");
|
||||
createToolOptionsAction("A_ToolOption_Snap", tr("Snap"), "");
|
||||
createToolOptionsAction("A_ToolOption_AutoClose", tr("Auto Close"), "");
|
||||
createToolOptionsAction("A_ToolOption_DrawUnder", tr("Draw Under"), "");
|
||||
createToolOptionsAction("A_ToolOption_AutoSelectDrawing",
|
||||
tr("Auto Select Drawing"), "");
|
||||
createToolOptionsAction("A_ToolOption_Autofill", tr("Auto Fill"), "");
|
||||
|
|
|
@ -35,6 +35,7 @@
|
|||
#define MI_SaveLevelAs "MI_SaveLevelAs"
|
||||
#define MI_ExportLevel "MI_ExportLevel"
|
||||
#define MI_SavePaletteAs "MI_SavePaletteAs"
|
||||
#define MI_SaveStudioPalette "MI_SaveStudioPalette"
|
||||
#define MI_OverwritePalette "MI_OverwritePalette"
|
||||
#define MI_SaveAsDefaultPalette "MI_SaveAsDefaultPalette"
|
||||
#define MI_LoadColorModel "MI_LoadColorModel"
|
||||
|
|
|
@ -394,6 +394,8 @@ void ChangeObjectParent::refresh() {
|
|||
TXsheet *xsh = m_xsheetHandle->getXsheet();
|
||||
TStageObjectId currentObjectId = m_objectHandle->getObjectId();
|
||||
TStageObjectId parentId = xsh->getStageObject(currentObjectId)->getParent();
|
||||
TStageObject* currentObject = xsh->getStageObject(currentObjectId);
|
||||
std::list<TStageObject*> children = currentObject->getChildren();
|
||||
TStageObjectTree *tree = xsh->getStageObjectTree();
|
||||
int objectCount = tree->getStageObjectCount();
|
||||
QString text;
|
||||
|
@ -420,7 +422,10 @@ void ChangeObjectParent::refresh() {
|
|||
}
|
||||
}
|
||||
}
|
||||
if (id == currentObjectId) continue;
|
||||
|
||||
bool found = (std::find(children.begin(), children.end(), xsh->getStageObject(id)) != children.end());
|
||||
|
||||
if (id == currentObjectId || found) continue;
|
||||
if (id.isTable()) {
|
||||
newText = QString("Table");
|
||||
pegbarList.append(newText);
|
||||
|
@ -2296,11 +2301,10 @@ void ColumnArea::mousePressEvent(QMouseEvent *event) {
|
|||
.adjusted(0, 0, -20, 0)
|
||||
.contains(mouseInCell)) {
|
||||
m_changeObjectParent->refresh();
|
||||
|
||||
m_changeObjectParent->show(QPoint(
|
||||
o->rect(PredefinedRect::PARENT_HANDLE_NAME).bottomLeft() +
|
||||
m_viewer->positionToXY(CellPosition(0, m_col)) +
|
||||
QPoint(o->rect(PredefinedRect::CAMERA_CELL).width(), 4) -
|
||||
m_viewer->positionToXY(CellPosition(1, m_col)) +
|
||||
QPoint(o->rect(PredefinedRect::CAMERA_CELL).width(), 14) -
|
||||
QPoint(m_viewer->getColumnScrollValue(), 0)));
|
||||
return;
|
||||
}
|
||||
|
@ -2312,8 +2316,8 @@ void ColumnArea::mousePressEvent(QMouseEvent *event) {
|
|||
m_changeObjectHandle->refresh();
|
||||
m_changeObjectHandle->show(QPoint(
|
||||
o->rect(PredefinedRect::PARENT_HANDLE_NAME).bottomLeft() +
|
||||
m_viewer->positionToXY(CellPosition(0, m_col + 1)) +
|
||||
QPoint(2, 0) - QPoint(m_viewer->getColumnScrollValue(), 0)));
|
||||
m_viewer->positionToXY(CellPosition(1, m_col + 1)) +
|
||||
QPoint(2, 14) - QPoint(m_viewer->getColumnScrollValue(), 0)));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -663,7 +663,7 @@ void StudioPaletteCmd::updateAllLinkedStyles(TPaletteHandle *paletteHandle,
|
|||
}
|
||||
}
|
||||
if (!paletteHandle || !paletteHandle->getPalette()) return;
|
||||
if (somethingChanged) paletteHandle->notifyColorStyleChanged();
|
||||
if (somethingChanged) paletteHandle->notifyColorStyleChanged(false);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
|
|
@ -502,24 +502,25 @@ void PaletteViewer::createSavePaletteToolBar() {
|
|||
|
||||
if (m_viewType == STUDIO_PALETTE) {
|
||||
connect(savePalette, SIGNAL(triggered()), this, SLOT(saveStudioPalette()));
|
||||
m_viewMode->addSeparator();
|
||||
m_viewMode->addAction(savePalette);
|
||||
//m_viewMode->addSeparator();
|
||||
//m_viewMode->addAction(savePalette);
|
||||
m_savePaletteToolBar->addAction(savePalette);
|
||||
} else if (m_viewType == LEVEL_PALETTE) {
|
||||
// save load palette
|
||||
m_viewMode->addSeparator();
|
||||
|
||||
// overwrite palette
|
||||
connect(savePalette, SIGNAL(triggered()),
|
||||
CommandManager::instance()->getAction("MI_OverwritePalette"),
|
||||
SIGNAL(triggered()));
|
||||
m_viewMode->addAction(savePalette);
|
||||
|
||||
// save palette as
|
||||
connect(saveAsPalette, SIGNAL(triggered()),
|
||||
CommandManager::instance()->getAction("MI_SavePaletteAs"),
|
||||
SIGNAL(triggered()));
|
||||
m_viewMode->addAction(saveAsPalette);
|
||||
|
||||
// overwrite palette
|
||||
connect(savePalette, SIGNAL(triggered()),
|
||||
CommandManager::instance()->getAction("MI_OverwritePalette"),
|
||||
SIGNAL(triggered()));
|
||||
m_viewMode->addAction(savePalette);
|
||||
|
||||
// save as default palette
|
||||
connect(saveDefaultPalette, SIGNAL(triggered()),
|
||||
CommandManager::instance()->getAction("MI_SaveAsDefaultPalette"),
|
||||
|
@ -713,6 +714,7 @@ void PaletteViewer::setSaveDefaultText(QAction *action, int levelType) {
|
|||
action->setText(tr("&Save As Default Palette"));
|
||||
break;
|
||||
}
|
||||
action->setIcon(createQIcon("save"));
|
||||
}
|
||||
|
||||
void PaletteViewer::contextMenuEvent(QContextMenuEvent *event) {
|
||||
|
@ -800,6 +802,10 @@ void PaletteViewer::showEvent(QShowEvent *) {
|
|||
SLOT(changeWindowTitle()));
|
||||
connect(m_paletteHandle, SIGNAL(paletteDirtyFlagChanged()), this,
|
||||
SLOT(changeWindowTitle()));
|
||||
if (m_viewType == STUDIO_PALETTE) {
|
||||
CommandManager::instance()->getAction("MI_SaveStudioPalette")->setEnabled(true);
|
||||
connect(CommandManager::instance()->getAction("MI_SaveStudioPalette"), SIGNAL(triggered()), this, SLOT(saveStudioPalette()));
|
||||
}
|
||||
|
||||
if (!m_frameHandle) return;
|
||||
// Connessione necessaria per aggiornare lo stile in caso di palette animate.
|
||||
|
@ -822,6 +828,12 @@ void PaletteViewer::hideEvent(QHideEvent *) {
|
|||
SLOT(changeWindowTitle()));
|
||||
disconnect(m_paletteHandle, SIGNAL(paletteDirtyFlagChanged()), this,
|
||||
SLOT(changeWindowTitle()));
|
||||
disconnect(m_paletteHandle, SIGNAL(broadcastColorStyleChangedOnMouseRelease()), this,
|
||||
SLOT(onPaletteChanged()));
|
||||
if (m_viewType == STUDIO_PALETTE) {
|
||||
CommandManager::instance()->getAction("MI_SaveStudioPalette")->setEnabled(false);
|
||||
disconnect(CommandManager::instance()->getAction("MI_SaveStudioPalette"), SIGNAL(triggered()), this, SLOT(saveStudioPalette()));
|
||||
}
|
||||
|
||||
if (!m_frameHandle) return;
|
||||
disconnect(m_frameHandle, SIGNAL(frameSwitched()), this,
|
||||
|
@ -1311,4 +1323,4 @@ void PaletteViewer::onShowNewStyleButtonToggled() {
|
|||
}
|
||||
m_pageViewer->computeSize();
|
||||
m_pageViewer->update();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue