Skip to content

Commit

Permalink
show project root path in export scene popup
Browse files Browse the repository at this point in the history
  • Loading branch information
shun-iwasawa committed Apr 26, 2023
1 parent c360f65 commit 6dff6b1
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions toonz/sources/toonz/exportscenepopup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -189,9 +189,10 @@ void ExportSceneDvDirModelRootNode::refreshChildren() {
int i;
for (i = 0; i < (int)projectRoots.size(); i++) {
TFilePath projectRoot = projectRoots[i];
std::wstring rootDir = projectRoot.getWideString();
ExportSceneDvDirModelSpecialFileFolderNode *projectRootNode =
new ExportSceneDvDirModelSpecialFileFolderNode(this, L"Project root",
projectRoot);
new ExportSceneDvDirModelSpecialFileFolderNode(
this, L"Project root (" + rootDir + L")", projectRoot);
projectRootNode->setPixmap(QPixmap(recolorPixmap(
svgToPixmap(getIconThemePath("actions/18/folder_project_root.svg")))));
m_projectRootNodes.push_back(projectRootNode);
Expand Down Expand Up @@ -272,7 +273,7 @@ DvDirModelNode *ExportSceneDvDirModel::getNode(const QModelIndex &index) const {
QModelIndex ExportSceneDvDirModel::index(int row, int column,
const QModelIndex &parent) const {
if (column != 0) return QModelIndex();
DvDirModelNode *parentNode = m_root;
DvDirModelNode *parentNode = m_root;
if (parent.isValid()) parentNode = getNode(parent);
if (row < 0 || row >= parentNode->getChildCount()) return QModelIndex();
DvDirModelNode *node = parentNode->getChild(row);
Expand Down Expand Up @@ -462,10 +463,10 @@ ExportSceneTreeView::ExportSceneTreeView(QWidget *parent)
// bottom horizontal scrollbar to resize contents...
bool ret = connect(this, SIGNAL(expanded(const QModelIndex &)), this,
SLOT(resizeToConts()));
ret = ret && connect(this, SIGNAL(collapsed(const QModelIndex &)), this,
SLOT(resizeToConts()));
ret = ret && connect(this->model(), SIGNAL(layoutChanged()), this,
SLOT(resizeToConts()));
ret = ret && connect(this, SIGNAL(collapsed(const QModelIndex &)), this,
SLOT(resizeToConts()));
ret = ret && connect(this->model(), SIGNAL(layoutChanged()), this,
SLOT(resizeToConts()));

assert(ret);
setAcceptDrops(true);
Expand Down Expand Up @@ -556,7 +557,7 @@ ExportScenePopup::ExportScenePopup(std::vector<TFilePath> scenes)

m_newProjectName = new LineEdit(newProjectWidget);
ret = ret && connect(m_newProjectName, SIGNAL(focusIn()), this,
SLOT(onProjectNameFocusIn()));
SLOT(onProjectNameFocusIn()));
newProjectLayout->setColumnStretch(1, 5);
newProjectLayout->addWidget(m_newProjectName, 1, 1, 1, 1, Qt::AlignLeft);

Expand Down

0 comments on commit 6dff6b1

Please sign in to comment.