mirror of
https://github.com/rizinorg/cutter.git
synced 2024-12-19 03:16:10 +00:00
parent
d05fdd3d44
commit
7f80f96c55
@ -578,6 +578,7 @@ void MainWindow::restoreDocks()
|
||||
tabifyDockWidget(dashboardDock, vTablesDock);
|
||||
|
||||
// Add Stack, Registers and Backtrace vertically stacked
|
||||
addDockWidget(Qt::TopDockWidgetArea, stackDock);
|
||||
splitDockWidget(stackDock, registersDock, Qt::Vertical);
|
||||
tabifyDockWidget(stackDock, backtraceDock);
|
||||
// MemoryMap/Breakpoint/RegRefs widget goes in the center tabs
|
||||
@ -679,6 +680,19 @@ void MainWindow::resetToDefaultLayout()
|
||||
}
|
||||
|
||||
void MainWindow::resetToDebugLayout()
|
||||
{
|
||||
CutterCore::MemoryWidgetType memType = core->getMemoryWidgetPriority();
|
||||
hideAllDocks();
|
||||
restoreDocks();
|
||||
showDebugDocks();
|
||||
core->raisePrioritizedMemoryWidget(memType);
|
||||
|
||||
auto restoreStackDock = qhelpers::forceWidth(stackDock->widget(), 400);
|
||||
qApp->processEvents();
|
||||
restoreStackDock.restoreWidth(stackDock->widget());
|
||||
}
|
||||
|
||||
void MainWindow::restoreDebugLayout()
|
||||
{
|
||||
CutterCore::MemoryWidgetType memType = core->getMemoryWidgetPriority();
|
||||
bool isMaxim = isMaximized();
|
||||
@ -725,9 +739,14 @@ void MainWindow::on_actionFunctionsRename_triggered()
|
||||
|
||||
void MainWindow::on_actionDefault_triggered()
|
||||
{
|
||||
if (core->currentlyDebugging) {
|
||||
resetToDebugLayout();
|
||||
} else {
|
||||
resetToDefaultLayout();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief MainWindow::on_actionNew_triggered
|
||||
* Open a new Cutter session.
|
||||
@ -944,7 +963,7 @@ void MainWindow::projectSaved(bool successfully, const QString &name)
|
||||
void MainWindow::changeDebugView()
|
||||
{
|
||||
saveSettings();
|
||||
resetToDebugLayout();
|
||||
restoreDebugLayout();
|
||||
enableDebugWidgetsMenu(true);
|
||||
}
|
||||
|
||||
|
@ -238,6 +238,7 @@ private:
|
||||
|
||||
void resetToDefaultLayout();
|
||||
void resetToDebugLayout();
|
||||
void restoreDebugLayout();
|
||||
|
||||
void restoreDocks();
|
||||
void hideAllDocks();
|
||||
|
Loading…
Reference in New Issue
Block a user