diff --git a/src/Config.h b/src/Config.h index 85ed0b64..c85863db 100644 --- a/src/Config.h +++ b/src/Config.h @@ -30,7 +30,7 @@ #define VER_LAMEXP_MINOR_LO 3 #define VER_LAMEXP_TYPE Alpha #define VER_LAMEXP_PATCH 15 -#define VER_LAMEXP_BUILD 660 +#define VER_LAMEXP_BUILD 662 /////////////////////////////////////////////////////////////////////////////// // Tools versions diff --git a/src/Dialog_MainWindow.cpp b/src/Dialog_MainWindow.cpp index 846020f3..82c8241c 100644 --- a/src/Dialog_MainWindow.cpp +++ b/src/Dialog_MainWindow.cpp @@ -132,6 +132,8 @@ MainWindow::MainWindow(FileListModel *fileListModel, AudioFileModel *metaInfo, S connect(m_fileListModel, SIGNAL(rowsRemoved(QModelIndex,int,int)), this, SLOT(sourceModelChanged())); connect(m_fileListModel, SIGNAL(modelReset()), this, SLOT(sourceModelChanged())); connect(sourceFileView, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(sourceFilesContextMenu(QPoint))); + connect(sourceFileView->verticalScrollBar(), SIGNAL(sliderMoved(int)), this, SLOT(sourceFilesScrollbarMoved(int))); + connect(sourceFileView->verticalScrollBar(), SIGNAL(valueChanged(int)), this, SLOT(sourceFilesScrollbarMoved(int))); connect(m_showDetailsContextAction, SIGNAL(triggered(bool)), this, SLOT(showDetailsButtonClicked())); connect(m_previewContextAction, SIGNAL(triggered(bool)), this, SLOT(previewContextActionTriggered())); connect(m_findFileContextAction, SIGNAL(triggered(bool)), this, SLOT(findFileContextActionTriggered())); @@ -862,10 +864,6 @@ bool MainWindow::eventFilter(QObject *obj, QEvent *event) break; } } - else if(obj == sourceFileView->viewport()) - { - sourceFileView ->resizeColumnToContents(0); - } return false; } @@ -1863,6 +1861,15 @@ void MainWindow::sourceFilesContextMenu(const QPoint &pos) } } +/* + * Scrollbar of source files moved + */ +void MainWindow::sourceFilesScrollbarMoved(int) +{ + qDebug("sourceFileView->resizeColumnToContents(0);"); + sourceFileView->resizeColumnToContents(0); +} + /* * Open selected file in external player */ diff --git a/src/Dialog_MainWindow.h b/src/Dialog_MainWindow.h index 6d96b1be..d593dc0d 100644 --- a/src/Dialog_MainWindow.h +++ b/src/Dialog_MainWindow.h @@ -118,6 +118,7 @@ private slots: void showFolderContextActionTriggered(void); void showRenameMacros(const QString &text); void sourceFilesContextMenu(const QPoint &pos); + void sourceFilesScrollbarMoved(int); void sourceModelChanged(void); void styleActionActivated(QAction *action); void tabActionActivated(QAction *action); diff --git a/src/Dialog_Processing.cpp b/src/Dialog_Processing.cpp index 703faf35..8fb2b532 100644 --- a/src/Dialog_Processing.cpp +++ b/src/Dialog_Processing.cpp @@ -135,6 +135,7 @@ ProcessingDialog::ProcessingDialog(FileListModel *fileListModel, AudioFileModel connect(m_progressModel, SIGNAL(rowsInserted(QModelIndex,int,int)), this, SLOT(progressModelChanged())); connect(m_progressModel, SIGNAL(modelReset()), this, SLOT(progressModelChanged())); connect(view_log, SIGNAL(activated(QModelIndex)), this, SLOT(logViewDoubleClicked(QModelIndex))); + connect(view_log->horizontalHeader(), SIGNAL(sectionResized(int,int,int)), this, SLOT(logViewSectionSizeChanged(int,int,int))); //Create context menu m_contextMenu = new QMenu(); @@ -264,10 +265,6 @@ bool ProcessingDialog::eventFilter(QObject *obj, QEvent *event) QDesktopServices::openUrl(url); } } - else if(obj == view_log->viewport()) - { - view_log->resizeColumnToContents(1); - } return false; } @@ -482,6 +479,18 @@ void ProcessingDialog::logViewDoubleClicked(const QModelIndex &index) } } +void ProcessingDialog::logViewSectionSizeChanged(int logicalIndex, int oldSize, int newSize) +{ + qDebug("sectionResized"); + if(logicalIndex == 1) + { + if(QHeaderView *hdr = view_log->horizontalHeader()) + { + hdr->setMinimumSectionSize(max(hdr->minimumSectionSize(), hdr->sectionSize(1))); + } + } +} + void ProcessingDialog::contextMenuTriggered(const QPoint &pos) { QAbstractScrollArea *scrollArea = dynamic_cast(QObject::sender()); diff --git a/src/Dialog_Processing.h b/src/Dialog_Processing.h index 44ad3718..13eb76f8 100644 --- a/src/Dialog_Processing.h +++ b/src/Dialog_Processing.h @@ -52,6 +52,7 @@ private slots: void processFinished(const QUuid &jobId, const QString &outFileName, bool success); void progressModelChanged(void); void logViewDoubleClicked(const QModelIndex &index); + void logViewSectionSizeChanged(int, int, int); void contextMenuTriggered(const QPoint &pos); void contextMenuDetailsActionTriggered(void); void contextMenuShowFileActionTriggered(void);