fix: support editing instance names
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
This commit is contained in:
parent
7a5f49571d
commit
2bf8fa9cb4
@ -1361,9 +1361,6 @@ bool MainWindow::eventFilter(QObject *obj, QEvent *ev)
|
||||
case Qt::Key_F5:
|
||||
refreshInstances();
|
||||
return true;
|
||||
case Qt::Key_F2:
|
||||
on_actionRenameInstance_triggered();
|
||||
return true;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@ -1855,10 +1852,8 @@ void MainWindow::on_actionExportInstance_triggered()
|
||||
|
||||
void MainWindow::on_actionRenameInstance_triggered()
|
||||
{
|
||||
if (m_selectedInstance)
|
||||
{
|
||||
// FIXME
|
||||
}
|
||||
// NOTE: editSelected already checky if an instance is selected
|
||||
view->editSelected();
|
||||
}
|
||||
|
||||
void MainWindow::on_actionViewSelectedInstFolder_triggered()
|
||||
|
@ -58,6 +58,14 @@ void InstanceView::switchDisplayMode(InstanceView::DisplayMode mode)
|
||||
}
|
||||
}
|
||||
|
||||
void InstanceView::editSelected()
|
||||
{
|
||||
auto current = currentView()->selectionModel()->currentIndex();
|
||||
if (current.isValid()) {
|
||||
currentView()->edit(current);
|
||||
}
|
||||
}
|
||||
|
||||
void InstanceView::prepareModel()
|
||||
{
|
||||
m_tableProxy = new InstanceTableProxyModel(this);
|
||||
|
@ -52,6 +52,8 @@ class InstanceView : public QStackedWidget {
|
||||
|
||||
void setCatDisplayed(bool enabled);
|
||||
|
||||
void editSelected();
|
||||
|
||||
signals:
|
||||
void instanceActivated(InstancePtr inst);
|
||||
void currentInstanceChanged(InstancePtr current, InstancePtr previous);
|
||||
|
Loading…
x
Reference in New Issue
Block a user