Skip to content

Commit

Permalink
20241218
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulSquires committed Dec 18, 2024
1 parent 6c2a61f commit f72f0b3
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 12 deletions.
7 changes: 2 additions & 5 deletions src/_TODO.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@ DEAR IMGUI QUIRKS
- InputTextMultiline handles most languages with UTF8 but not ones like Hebrew.


FIXED FOR 5.02
- Added Setting option change the program's font size (program must be restarted for the changes to take effect).
- The 3rd panel width in "Journal Notes" was not stretching to fill available space on resize.
- In Journal Notes, fixed the "+ Add New Note" button not repositioning when the panel was resized.
- The setting "Display Net and Excess portfolio liquidity amounts" would not correctly show/hide the labels and amounts on the main screen.
FIXED FOR 5.03
- Fixed application crash when selecting the "pencil" edit icon in the Transactions tab.

2 changes: 1 addition & 1 deletion src/appstate.h
Original file line number Diff line number Diff line change
Expand Up @@ -597,7 +597,7 @@ struct AppState {
CDatabase db{};
CConfig config{};

std::string version_current_display = "5.02";
std::string version_current_display = "5.03";
std::string version_available_display = "";

int ticker_id = 1; // incrementing counter for requesting market data
Expand Down
9 changes: 7 additions & 2 deletions src/closed_trades.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,20 @@ void SetFirstLineClosedTrades(AppState& state, std::vector<CListPanelData>& vec)
// selectable line in the list.
state.closedtrades_selected_trade = nullptr;

// ensure all other lines are not selected
for (auto& ld : vec) {
ld.is_selected = false;
}

// If this is the first selectable line in the grid then default to displaying
// the TradeHistory for this item.
for (auto& ld : vec) {
ld.is_selected = false; // ensure all other lines are not selected
if (!state.closedtrades_selected_trade && ld.line_type == LineType::ticker_line) {
if (ld.line_type == LineType::ticker_line) {
ld.is_selected = true;
state.closedtrades_selected_trade = ld.trade;
state.selected_tabpanelitem = TabPanelItem::ClosedTrades;
SelectTabPanelItem(state);
break;
}
}
}
Expand Down
6 changes: 4 additions & 2 deletions src/transaction_edit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ SOFTWARE.
#include "transaction_edit.h"
#include "utilities.h"

#include <iostream>


std::shared_ptr<Leg> GetLegBackPointer(std::shared_ptr<Trade> trade, int back_pointer_id) {
if (back_pointer_id == 0) return nullptr;
Expand Down Expand Up @@ -165,13 +167,13 @@ void ShowTransEdit(AppState& state) {

static CListPanel lp;

if (!state.is_transactions_data_loaded) {
if (!state.is_transedit_data_loaded) {
lp.table_id = TableType::trans_edit;
lp.is_left_panel = false;
lp.table_flags = ImGuiTableFlags_ScrollY;
lp.outer_size_x = 0.0f;
lp.outer_size_y = 0.0f;
lp.column_count = MAX_COLUMNS;
lp.column_count = 9;
lp.vec = &vec;
lp.vecHeader = nullptr;
lp.header_backcolor = 0;
Expand Down
10 changes: 8 additions & 2 deletions src/transaction_panel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,20 @@ void SetFirstLineTransactions(AppState& state, std::vector<CListPanelData>& vec)
// selectable line in the list.
state.transactions_selected_trade = nullptr;

// ensure all other lines are not selected
for (auto& ld : vec) {
ld.is_selected = false;
}

// If this is the first selectable line in the grid then default to displaying
// the TradeHistory for this item.
for (auto& ld : vec) {
ld.is_selected = false; // ensure all other lines are not selected
if (!state.transactions_selected_trade && ld.line_type == LineType::ticker_line) {
if (ld.line_type == LineType::ticker_line) {
ld.is_selected = true;
state.transactions_selected_trade = ld.trade;
state.selected_tabpanelitem = TabPanelItem::Transactions;
SelectTabPanelItem(state);
break;
}
}
}
Expand Down Expand Up @@ -132,6 +137,7 @@ void LoadTransactionsData(AppState& state, std::vector<CListPanelData>& vec) {
state.is_transactions_data_loaded = true;
}


void ShowTransPanel(AppState& state) {
if (!state.show_transpanel) return;

Expand Down

0 comments on commit f72f0b3

Please sign in to comment.