OpenToonz - An open-source full-featured 2D animation creation software
C
Fix svn dialog size issues
manongjohna8a7ab6cb299
diff --git a/toonz/sources/toonz/svncommitdialog.cpp b/toonz/sources/toonz/svncommitdialog.cppindex a3803c779..a99987724 100644--- a/toonz/sources/toonz/svncommitdialog.cpp+++ b/toonz/sources/toonz/svncommitdialog.cpp@@ -469,7 +469,8 @@ void SVNCommitDialog::onResourcesStatusRetrieved(const QString &xmlResponse) {void SVNCommitDialog::onStatusRetrieved(const QString &xmlResponse) {SVNStatusReader sr(xmlResponse);- m_status = sr.getStatus();+ m_status = sr.getStatus();+ int height = 160;m_thread.disconnect(SIGNAL(statusRetrieved(const QString &)));@@ -508,6 +509,10 @@ void SVNCommitDialog::onStatusRetrieved(const QString &xmlResponse) {}}+ if (m_treeWidget->isVisible()) height += (filesToPutCount * 25);++ setMinimumSize(350, min(height, 350));+m_waitingLabel->hide();m_commentLabel->show();m_commentTextEdit->show();@@ -531,6 +536,10 @@ void SVNCommitDialog::onStatusRetrieved(const QString &xmlResponse) {m_selectionLabel->show();}+ if (m_treeWidget->isVisible()) height += (m_items.size() * 25);++ setMinimumSize(350, min(height, 350));+m_waitingLabel->hide();m_textLabel->hide();m_commentLabel->show();@@ -916,7 +925,7 @@ SVNCommitFrameRangeDialog::SVNCommitFrameRangeDialog(QWidget *parent,setWindowTitle(tr("Version Control: Put"));- setMinimumSize(300, 150);+ setMinimumSize(350, 150);QWidget *container = new QWidget;QVBoxLayout *mainLayout = new QVBoxLayout;diff --git a/toonz/sources/toonz/svndeletedialog.cpp b/toonz/sources/toonz/svndeletedialog.cppindex c2557a6ee..e3e0da7b3 100644--- a/toonz/sources/toonz/svndeletedialog.cpp+++ b/toonz/sources/toonz/svndeletedialog.cpp@@ -169,8 +169,15 @@ SVNDeleteDialog::SVNDeleteDialog(QWidget *parent, const QString &workingDir,//-----------------------------------------------------------------------------void SVNDeleteDialog::showEvent(QShowEvent *e) {+ if (!m_isFolder) {+ initTreeWidget();++ int height = 50;+ if (m_treeWidget->isVisible()) height += (m_files.size() * 50);++ setMinimumSize(300, min(height, 350));+ }QDialog::showEvent(e);- if (!m_isFolder) initTreeWidget();}//-----------------------------------------------------------------------------@@ -261,6 +268,10 @@ void SVNDeleteDialog::onDeleteServerButtonClicked() {m_deleteServerButton->setText(tr("Delete"));connect(m_deleteServerButton, SIGNAL(clicked()), this, SLOT(deleteFiles()));+ int height = 175;+ if (m_treeWidget->isVisible()) height += (m_files.size() * 50);+ setMinimumSize(300, min(height, 350));+m_textLabel->setText(tr("You are deleting items also on repository. Are you sure ?"));m_commentLabel->show();diff --git a/toonz/sources/toonz/svnlockdialog.cpp b/toonz/sources/toonz/svnlockdialog.cppindex 03a381eb1..819030b4a 100644--- a/toonz/sources/toonz/svnlockdialog.cpp+++ b/toonz/sources/toonz/svnlockdialog.cpp@@ -185,6 +185,12 @@ void SVNLockDialog::onStatusRetrieved(const QString &xmlResponse) {switchToCloseButton();} else {+ int height = m_lock ? 160 : 50;+ if (m_treeWidget->isVisible())+ height += (m_filesToEdit.size() * (m_lock ? 25 : 50));++ setMinimumSize(300, min(height, 350));+m_waitingLabel->hide();if (m_lock)diff --git a/toonz/sources/toonz/svnlockframerangedialog.cpp b/toonz/sources/toonz/svnlockframerangedialog.cppindex d8929adec..d9930d036 100644--- a/toonz/sources/toonz/svnlockframerangedialog.cpp+++ b/toonz/sources/toonz/svnlockframerangedialog.cpp@@ -185,6 +185,10 @@ void SVNLockFrameRangeDialog::onPropGetDone(const QString &xmlResponse) {}}+ int height =+ 180 + (m_lockInfos.isEmpty() ? 0 : ((m_lockInfos.size() - 1) * 25));+ setMinimumSize(300, height);+m_lockButton->show();m_cancelButton->show();@@ -531,6 +535,10 @@ void SVNLockMultiFrameRangeDialog::onStatusRetrieved(m_textLabel->setText(temp);}+ int height =+ 180 + (m_lockInfos.isEmpty() ? 0 : ((m_lockInfos.size() - 1) * 25));+ setMinimumSize(300, height);+m_lockButton->show();m_cancelButton->show();@@ -1115,6 +1123,9 @@ void SVNFrameRangeLockInfoDialog::onPropGetDone(const QString &xmlResponse) {.arg(lock.m_from).arg(lock.m_to));}+ int height = 100 + ((lockInfos.size() - 1) * 25);+ setMinimumSize(300, height);+m_textLabel->setText(temp);}}@@ -1224,6 +1235,9 @@ void SVNMultiFrameRangeLockInfoDialog::onStatusRetrieved(.arg(lock.m_from).arg(lock.m_to));}+ int height = 100 + ((lockInfos.size() - 1) * 25);+ setMinimumSize(300, height);+m_textLabel->setText(temp);}}diff --git a/toonz/sources/toonz/svnrevertdialog.cpp b/toonz/sources/toonz/svnrevertdialog.cppindex 6d3d433d5..41feb4e84 100644--- a/toonz/sources/toonz/svnrevertdialog.cpp+++ b/toonz/sources/toonz/svnrevertdialog.cpp@@ -121,7 +121,8 @@ SVNRevertDialog::SVNRevertDialog(QWidget *parent, const QString &workingDir,void SVNRevertDialog::onStatusRetrieved(const QString &xmlResponse) {SVNStatusReader sr(xmlResponse);- m_status = sr.getStatus();+ m_status = sr.getStatus();+ int height = 50;checkFiles();@@ -140,6 +141,10 @@ void SVNRevertDialog::onStatusRetrieved(const QString &xmlResponse) {m_textLabel->setText(msg);switchToCloseButton();} else {+ if (m_treeWidget->isVisible()) height += (m_filesToRevert.size() * 50);++ setMinimumSize(300, min(height, 350));+QString msg = QString(tr("%1 items to revert.")).arg(m_filesToRevert.size() == 1? 1diff --git a/toonz/sources/toonz/svnupdateandlockdialog.cpp b/toonz/sources/toonz/svnupdateandlockdialog.cppindex 1659a080c..2a15fe7b1 100644--- a/toonz/sources/toonz/svnupdateandlockdialog.cpp+++ b/toonz/sources/toonz/svnupdateandlockdialog.cpp@@ -156,6 +156,8 @@ void SVNUpdateAndLockDialog::onStatusRetrieved(const QString &xmlResponse) {m_commentLabel->show();switchToCloseButton();} else {+ setMinimumSize(300, 150);+m_waitingLabel->hide();m_textLabel->setText(diff --git a/toonz/sources/toonz/svnupdatedialog.cpp b/toonz/sources/toonz/svnupdatedialog.cppindex 1dbad966d..13a84e982 100644--- a/toonz/sources/toonz/svnupdatedialog.cpp+++ b/toonz/sources/toonz/svnupdatedialog.cpp@@ -257,6 +257,8 @@ void SVNUpdateDialog::updateFiles() {return;}+ setMinimumSize(300, 200);+if (m_updateSceneContentsCheckBox) m_updateSceneContentsCheckBox->hide();m_updateButton->setEnabled(false);m_waitingLabel->hide();