diff options
Diffstat (limited to 'src-qt5')
-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); |