diff options
author | Sasongko Bawono <sasongko262@gmail.com> | 2017-02-26 08:33:25 +0700 |
---|---|---|
committer | Sasongko Bawono <sasongko262@gmail.com> | 2017-02-26 08:33:25 +0700 |
commit | eb7d5a1270d17ecd16912008d8587cc543cafc77 (patch) | |
tree | 64be065a2e3fe58933bb5be6f30cc76a1af33f86 /src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.cpp | |
parent | modified DEPENDENCIES for Slackware (diff) | |
parent | Merge remote-tracking branch 'origin/master' (diff) | |
download | lumina-eb7d5a1270d17ecd16912008d8587cc543cafc77.tar.gz lumina-eb7d5a1270d17ecd16912008d8587cc543cafc77.tar.bz2 lumina-eb7d5a1270d17ecd16912008d8587cc543cafc77.zip |
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.cpp')
-rw-r--r-- | src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.cpp b/src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.cpp index 967e6b1a..69693c7d 100644 --- a/src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.cpp +++ b/src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.cpp @@ -7,6 +7,7 @@ #include "DirWidget2.h" #include "ui_DirWidget2.h" +#include <QActionGroup> #include <QMessageBox> #include <QCursor> #include <QClipboard> @@ -44,9 +45,12 @@ DirWidget::DirWidget(QString objID, QWidget *parent) : QWidget(parent), ui(new U line_dir = new QLineEdit(this); toolbar->addWidget(line_dir); connect(line_dir, SIGNAL(returnPressed()), this, SLOT(dir_changed()) ); - toolbar->addAction(ui->actionSingleColumn); - ui->actionSingleColumn->setChecked(true); - toolbar->addAction(ui->actionDualColumn); + QActionGroup *columnActionGroup = new QActionGroup(this); + toolbar->addAction(ui->actionSingleColumn); + ui->actionSingleColumn->setChecked(true); + columnActionGroup->addAction(ui->actionSingleColumn); + toolbar->addAction(ui->actionDualColumn); + columnActionGroup->addAction(ui->actionDualColumn); toolbar->addAction(ui->actionMenu); //Add the browser widgets RCBW = 0; //right column browser is unavailable initially @@ -400,7 +404,6 @@ void DirWidget::dir_changed(){ void DirWidget::on_actionSingleColumn_triggered(bool checked){ if(!checked){ return; } - ui->actionDualColumn->setChecked(false); if(RCBW==0){ return; } //nothing to do ui->browser_layout->removeWidget(RCBW); RCBW->deleteLater(); @@ -410,7 +413,6 @@ void DirWidget::on_actionSingleColumn_triggered(bool checked){ void DirWidget::on_actionDualColumn_triggered(bool checked){ if(!checked){ return; } - ui->actionSingleColumn->setChecked(false); if(RCBW!=0){ return; } //nothing to do RCBW = new BrowserWidget("rc", this); ui->browser_layout->addWidget(RCBW); |