Add scrollbar (bug when add month ...)
Fix bug on account deletion
This commit is contained in:
parent
224e1e6d99
commit
1d1164ef02
|
@ -127,7 +127,10 @@ void KissCount::DeleteAccount(struct Account ac)
|
||||||
_db->DeleteAccount(ac);
|
_db->DeleteAccount(ac);
|
||||||
for (i=0, it=_user->_accounts.begin(); it !=_user->_accounts.end(); it++, i++)
|
for (i=0, it=_user->_accounts.begin(); it !=_user->_accounts.end(); it++, i++)
|
||||||
if (it->id == ac.id)
|
if (it->id == ac.id)
|
||||||
_user->_accounts.erase(_user->_accounts.begin()+i);
|
{
|
||||||
|
_user->_accounts.erase(_user->_accounts.begin()+i);
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
wxString KissCount::AddCategory(struct category category)
|
wxString KissCount::AddCategory(struct category category)
|
||||||
|
|
|
@ -19,7 +19,7 @@ EVT_TREE_KEY_DOWN(CALENDAR_TREE_ID, AccountPanel::OnTreeChange)
|
||||||
EVT_CALENDAR_SEL_CHANGED(CALENDAR_ID, AccountPanel::OnCalendarChange)
|
EVT_CALENDAR_SEL_CHANGED(CALENDAR_ID, AccountPanel::OnCalendarChange)
|
||||||
END_EVENT_TABLE()
|
END_EVENT_TABLE()
|
||||||
|
|
||||||
AccountPanel::AccountPanel(KissCount* kiss, wxUI *parent) : wxPanel(&(*parent)), _curMonth(-1), _curYear(-1), _kiss(kiss), _wxUI(parent), _tree(this, CALENDAR_TREE_ID, wxDefaultPosition, wxDefaultSize, wxTR_HIDE_ROOT)
|
AccountPanel::AccountPanel(KissCount* kiss, wxUI *parent) : wxScrolledWindow(&(*parent)), _curMonth(-1), _curYear(-1), _kiss(kiss), _wxUI(parent), _tree(this, CALENDAR_TREE_ID, wxDefaultPosition, wxDefaultSize, wxTR_HIDE_ROOT)
|
||||||
{
|
{
|
||||||
wxBoxSizer *hbox = new wxBoxSizer(wxHORIZONTAL);
|
wxBoxSizer *hbox = new wxBoxSizer(wxHORIZONTAL);
|
||||||
wxBoxSizer *hbox2 = new wxBoxSizer(wxHORIZONTAL);
|
wxBoxSizer *hbox2 = new wxBoxSizer(wxHORIZONTAL);
|
||||||
|
@ -44,6 +44,7 @@ AccountPanel::AccountPanel(KissCount* kiss, wxUI *parent) : wxPanel(&(*parent)),
|
||||||
wxColour(0xC5, 0x00, 0x0D),
|
wxColour(0xC5, 0x00, 0x0D),
|
||||||
wxColour(0x00, 0x84, 0xD1)};
|
wxColour(0x00, 0x84, 0xD1)};
|
||||||
wxBitmap bitmap(_(DELETE_ICON));
|
wxBitmap bitmap(_(DELETE_ICON));
|
||||||
|
|
||||||
SetSizer(hbox);
|
SetSizer(hbox);
|
||||||
|
|
||||||
ColorScheme* colorScheme = new ColorScheme(categoryColors, WXSIZEOF(categoryColors));
|
ColorScheme* colorScheme = new ColorScheme(categoryColors, WXSIZEOF(categoryColors));
|
||||||
|
@ -145,7 +146,9 @@ AccountPanel::AccountPanel(KissCount* kiss, wxUI *parent) : wxPanel(&(*parent)),
|
||||||
ChangeUser();
|
ChangeUser();
|
||||||
|
|
||||||
Fit();
|
Fit();
|
||||||
SetMinSize(GetSize());
|
|
||||||
|
SetMinSize(wxSize(1024, 640));
|
||||||
|
SetScrollbars(10, 10, 100/10, 100/10);
|
||||||
}
|
}
|
||||||
|
|
||||||
AccountPanel::~AccountPanel()
|
AccountPanel::~AccountPanel()
|
||||||
|
@ -367,8 +370,8 @@ void AccountPanel::ShowMonth(int month, int year)
|
||||||
_calendar->EnableYearChange(false);
|
_calendar->EnableYearChange(false);
|
||||||
_calendar->SetSize(_calendar->GetMinSize());
|
_calendar->SetSize(_calendar->GetMinSize());
|
||||||
|
|
||||||
Fit();
|
// Fit();
|
||||||
SetMinSize(GetSize());
|
// SetMinSize(GetSize());
|
||||||
}
|
}
|
||||||
|
|
||||||
void AccountPanel::InsertOperation(User* user, operation* op, int line, bool fix)
|
void AccountPanel::InsertOperation(User* user, operation* op, int line, bool fix)
|
||||||
|
@ -797,7 +800,6 @@ void AccountPanel::OnOperationModified(wxGridEvent& event)
|
||||||
}
|
}
|
||||||
|
|
||||||
UpdateStats();
|
UpdateStats();
|
||||||
|
|
||||||
inModification = false ;
|
inModification = false ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
#include <wx/treectrl.h>
|
#include <wx/treectrl.h>
|
||||||
#include <wx/pie/pieplot.h>
|
#include <wx/pie/pieplot.h>
|
||||||
#include <wx/chartpanel.h>
|
#include <wx/chartpanel.h>
|
||||||
|
#include <wx/scrolwin.h>
|
||||||
#include "CalendarEditor.h"
|
#include "CalendarEditor.h"
|
||||||
#include "wxGridCellBitmapRenderer.h"
|
#include "wxGridCellBitmapRenderer.h"
|
||||||
|
|
||||||
|
@ -28,7 +29,7 @@
|
||||||
class wxUI;
|
class wxUI;
|
||||||
class KissCount;
|
class KissCount;
|
||||||
|
|
||||||
class AccountPanel: public wxPanel
|
class AccountPanel: public wxScrolledWindow
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
AccountPanel(KissCount* kiss, wxUI *parent);
|
AccountPanel(KissCount* kiss, wxUI *parent);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user