summaryrefslogtreecommitdiffstats
path: root/desktop-widgets/mainwindow.cpp
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2020-03-02 10:57:18 +0100
committerGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2020-04-07 00:13:35 +0200
commitaccf1fcc8f6ad84a662aeba71d582abedbcedfd8 (patch)
treee320e4455185a4f0b7989aba12e37f44651dbe63 /desktop-widgets/mainwindow.cpp
parent3965ae2c89d30e424e52cb17cd6ecaf9e46ec0f0 (diff)
downloadsubsurface-accf1fcc8f6ad84a662aeba71d582abedbcedfd8.tar.gz
desktop: remove EDIT mode
The only way to enter edit mode is to edit the profile. However, that means that the profile is already visible, so there is no need to change the mode. Simply remove the EDIT mode. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'desktop-widgets/mainwindow.cpp')
-rw-r--r--desktop-widgets/mainwindow.cpp32
1 files changed, 0 insertions, 32 deletions
diff --git a/desktop-widgets/mainwindow.cpp b/desktop-widgets/mainwindow.cpp
index bbeb61f70..7796ddf04 100644
--- a/desktop-widgets/mainwindow.cpp
+++ b/desktop-widgets/mainwindow.cpp
@@ -1092,36 +1092,6 @@ void MainWindow::on_actionViewAll_triggered()
ui.bottomSplitter->setCollapsible(1,false);
}
-void MainWindow::enterEditState()
-{
- stateBeforeEdit = state;
- if (state == VIEWALL || state == INFO_MAXIMIZED)
- return;
- toggleCollapsible(true);
- beginChangeState(EDIT);
- ui.topSplitter->setSizes({ EXPANDED, EXPANDED });
- ui.mainSplitter->setSizes({ EXPANDED, COLLAPSED });
- int appW = qApp->desktop()->size().width();
- QList<int> infoProfileSizes { round_int(appW * 0.3), round_int(appW * 0.7) };
-
- QSettings settings;
- settings.beginGroup("MainWindow");
- if (settings.value("mainSplitter").isValid()) {
- ui.topSplitter->restoreState(settings.value("topSplitter").toByteArray());
- if (ui.topSplitter->sizes().first() == 0 || ui.topSplitter->sizes().last() == 0)
- ui.topSplitter->setSizes(infoProfileSizes);
- } else {
- ui.topSplitter->setSizes(infoProfileSizes);
- }
-}
-
-void MainWindow::exitEditState()
-{
- if (stateBeforeEdit == state)
- return;
- enterState(stateBeforeEdit);
-}
-
void MainWindow::enterState(CurrentState newState)
{
state = newState;
@@ -1141,8 +1111,6 @@ void MainWindow::enterState(CurrentState newState)
case PROFILE_MAXIMIZED:
on_actionViewProfile_triggered();
break;
- case EDIT:
- break;
}
}