From f4d47b31976bf0b95c8ee3e4c1f010ffe1d2fd21 Mon Sep 17 00:00:00 2001 From: Arno Date: Sat, 12 Oct 2013 08:18:41 +0200 Subject: Fix resizing of columns in FileView Don't emit needResize after every model SmDirModel-change. It freezes the GUI. Let the user decide -> add a QAction to the toolBar. --- shemov.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'shemov.cpp') diff --git a/shemov.cpp b/shemov.cpp index f5b8942..5289291 100644 --- a/shemov.cpp +++ b/shemov.cpp @@ -431,13 +431,14 @@ void SheMov::createActions(){ connect(mMoveToArchiveA, SIGNAL(triggered()), mFSWidget, SLOT(moveToArchive())); //View menu (FS) - mRefreshA = new QAction(QIcon(":/refresh.png"), tr("Refresh"), this); connect(mRefreshA, SIGNAL(triggered()), mFSWidget->fileModel(), SLOT(refresh())); mFSViewPropertiesA = new QAction(QIcon(":/bizarre_amputee.png"), tr("Properties..."), this); connect(mFSViewPropertiesA, SIGNAL(triggered()), mFSWidget->fileView(), SLOT(properties())); mFSPreviewA = new QAction(QIcon(":/male_chastity_belt.png"), tr("Preview..."), this); connect(mFSPreviewA, SIGNAL(triggered()), mFSWidget, SLOT(preview())); + mFSResizeA = new QAction(QIcon(":/analstretcher.png"), tr("Resize"), this); + connect(mFSResizeA, SIGNAL(triggered()), mFSWidget, SLOT(resizeFileView())); //Help menu QString aboutLabel = QString(tr("About %1...")).arg(qApp->applicationName()); @@ -705,6 +706,8 @@ void SheMov::createMenus(){ fsHeaderMenu->addActions(mFileSysHeaderGroup->actions()); mFSViewMenu->addMenu(fsHeaderMenu); mFSViewMenu->addSeparator(); + mFSViewMenu->addAction(mFSResizeA); + mFSViewMenu->addSeparator(); mFSViewMenu->addAction(mRefreshA); mViewFSMenuA = menuBar()->addMenu(mFSViewMenu); @@ -857,6 +860,7 @@ void SheMov::createToolBar(){ mFSWidget->toolBar()->addSeparator(); mFSWidget->toolBar()->addAction(mFSPreviewA); mFSWidget->toolBar()->addAction(mFSViewPropertiesA); + mFSWidget->toolBar()->addAction(mFSResizeA); mFSWidget->toolBar()->addSeparator(); mFSWidget->toolBar()->addAction(mConfigA); -- cgit v1.2.3-70-g09d2