Skip to content

Commit

Permalink
Don't show "Show rowid" menu item for views
Browse files Browse the repository at this point in the history
Don't show the "Show rowid column" context menu item for views because
views don't really have a rowid column (it's always NULL). So showing
the column doesn't really make a lot of sense and might even confuse
some users.

Also change the order of the menu items a little to be more consistent
for views and tables.
  • Loading branch information
MKleusberg committed May 12, 2017
1 parent 21ee1f2 commit 57c4e58
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/MainWindow.cpp
Expand Up @@ -154,9 +154,9 @@ void MainWindow::init()

popupBrowseDataHeaderMenu = new QMenu(this);
popupBrowseDataHeaderMenu->addAction(ui->actionShowRowidColumn);
popupBrowseDataHeaderMenu->addAction(ui->actionUnlockViewEditing);
popupBrowseDataHeaderMenu->addAction(ui->actionBrowseTableEditDisplayFormat);
popupBrowseDataHeaderMenu->addAction(ui->actionSetTableEncoding);
popupBrowseDataHeaderMenu->addAction(ui->actionUnlockViewEditing);
popupBrowseDataHeaderMenu->addSeparator();
popupBrowseDataHeaderMenu->addAction(ui->actionSetAllTablesEncoding);

Expand Down Expand Up @@ -528,9 +528,11 @@ void MainWindow::populateTable()
{
// Table
ui->actionUnlockViewEditing->setVisible(false);
ui->actionShowRowidColumn->setVisible(true);
} else {
// View
ui->actionUnlockViewEditing->setVisible(true);
ui->actionShowRowidColumn->setVisible(false);
}

// Set the recordset label
Expand Down

0 comments on commit 57c4e58

Please sign in to comment.