Skip to content

Commit

Permalink
Merge pull request #607 from reupen/fix-quick-setup
Browse files Browse the repository at this point in the history
Fix layout selection in Quick setup
  • Loading branch information
reupen authored Oct 2, 2022
2 parents f00a67d + fc54b3c commit a54f776
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 1 deletion.
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
# Change log

## Development version
## 2.0.0-alpha.3

### Bug fixes

- A crash in 64-bit builds after adding a Tab stack to the layout was fixed.
[[#606](https://github.com/reupen/columns_ui/pull/606)]

- A problem in the Quick setup dialogue box where selecting a layout preset had
no effect was fixed. [[#607](https://github.com/reupen/columns_ui/pull/607)]

## 2.0.0-alpha.2

### Features
Expand Down
27 changes: 27 additions & 0 deletions foo_ui_columns/setup_dialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,33 @@ INT_PTR QuickSetupDialog::SetupDialogProc(HWND wnd, UINT msg, WPARAM wp, LPARAM
}
}
break;
case WM_NOTIFY: {
auto lpnm = (LPNMHDR)lp;
switch (lpnm->idFrom) {
case IDC_LIST: {
switch (lpnm->code) {
case LVN_ITEMCHANGED: {
auto lpnmlv = (LPNMLISTVIEW)lp;
if (lpnmlv->iItem != -1 && lpnmlv->iItem >= 0 && (size_t)lpnmlv->iItem < m_presets.get_count()) {
if ((lpnmlv->uNewState & LVIS_SELECTED) && !(lpnmlv->uOldState & LVIS_SELECTED)) {
uie::splitter_item_ptr ptr;
m_presets[lpnmlv->iItem].get(ptr);
cfg_layout.set_preset(cfg_layout.get_active(), ptr.get_ptr());
m_preset_changed = true;
}
}
return 0;
}
default:
break;
}
break;
}
default:
break;
}
break;
}
case WM_CLOSE:
DestroyWindow(wnd);
return 0;
Expand Down

0 comments on commit a54f776

Please sign in to comment.